the Queen of Ruritania went shopping with her younger sister.
Each bought as many lengths of silk as she is years old and as many yards of each length as she bought lengths and paid for it as many francs per yard as she bought yards of each length.
The Queen spent 5803 francs more than her sister.
How old is the Queen?
Source : The weekend problems book; collected by Hubert Phillips UK 1932
q lengths of silk for the queen
q^2 total yards
q francs per yard
total of q^3 francs
Likewise for sister: s^3 francs
q^3 - s^3 = 5803
10 for S=1 to 120
20 S3=S*S*S
30 Q3=S3+5803
40 Q=int(Q3^(1/3)+0.5)
50 if Q*Q*Q=Q3 then print Q,S
60 next
Their ages are 20 and 13.
|
Posted by Charlie
on 2018-04-09 10:40:40 |