Thistle Nationals Scoring for DNF, Retired and TLE.

I guess that this score is a constant for any given race (but number of finishers may change from race to race).
for race 1 set up the score as DRT1=some easily calculated constant as per your formula; for race 2, DRT2=another constant, and so on. then score the non-finishers as DRT1, DRT2, etc. crude, but fairly easy to implement. and for next year make it easier on yourself.