Four friends, Arnold, Brian, Chuck and Denis, just played four rounds of a golf tournament. Their scores were all tied, even though the individual scores for the 16 rounds were all different. It is further known that:
(i) The 16 scores were all in the 60s and 70s.
(ii) All four of Arnold's scores were a prime.
(iii) All four of Brian's scores were
semiprimes.
(iv) None of Chuck's or Denis' scores was either prime or semiprime.
(v) Chuck's lowest round was better (lower) than Denis’ lowest round. Chuck's worst round was better than Denis’ worst round.
What was the score of each of the golfers for the four rounds?
The primes, semiprimes and others in the range are:
prime semiprime others
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
---- ---
351 347
As there are 5 primes and 5 semiprimes, we need to remove one of each. The totals differ by 4 and so the prime to be removed must be 4 higher than the semiprime removed. This is possible only with 73 and 69 being the numbers removed. The total of each set is then 347-69 = 351-73 = 278.
The other two players' scores must be chosen from the "others" column. The sets of 4 chosen from this column that add up to 278 are:
60 64 76 78
60 68 72 78
60 70 72 76
63 64 75 76
63 68 72 75
64 66 70 78
64 66 72 76
64 68 70 76
The only pair of rows that don't share any number and where one of the pair has both the lower lowest number and also the lower highest number are:
63 68 72 75
64 66 70 78
So:
Arnold (prime): 61 67 71 79
Brian (semiprime): 62 65 74 77
Chuck: 63 68 72 75
Denis: 64 66 70 78
For first table:
10 for I=60 to 79
15 if prmdiv(I)=I then print I:PrTot=PrTot+I
20 if fnSemiPrime(I) then print " ";I:SpTot=SpTot+I
25 if prmdiv(I)<I and fnSemiPrime(I)=0 then print " ";I
30 next
40 print PrTot,SpTot
100
200 end
300
400 fnSemiPrime(X)
410 if prmdiv(X)=X then return(0)
420 N=X//prmdiv(X)
430 if prmdiv(N)=N then return(-1)
440 return(0)
For second table:
DATA 60,63,64,66,68,70,72,75,76,78
FOR i = 1 TO 10: READ num(i): NEXT
FOR a = 1 TO 7
FOR b = a + 1 TO 8
FOR c = b + 1 TO 9
FOR d = c + 1 TO 10
IF num(a) + num(b) + num(c) + num(d) = 278 THEN
PRINT num(a); num(b); num(c); num(d)
END IF
NEXT
NEXT
NEXT
NEXT
|
Posted by Charlie
on 2009-11-30 13:59:39 |