Part 1
Description
Solution
Here is my attempt to solve this problem.H3: =IF(MOD($E$2,D3+C3)>C3,(1+ROUNDDOWN($E$2/(C3+D3),0))*B3*C3,ROUNDDOWN($E$2/(C3+D3),0)*B3*C3+MOD($E$2,D3+C3)*B3)
The code determine whether those reindeer are resting or bursting. If the time (2503)
mod the time needed for the reindeer to burst again (bursting time + resting time) is greater than burst time, then the reindeer is resting. Then the code calculate the distance covered. and simply get the largest value of those distances. Part 2
Description
Solution
For the part 2, I have to calculate the distance each reindeer covered in every second up to the 2503th and determine which one is leading. Now in column G, I put an array formula to counts how many those reindeer are in the lead, and therefore the point they get. And finally find the largest of those numbers. Here is my array formula:G3: =SUM(IF(H3:CRN3=H$13:CRN$13,1,0))
0 komentar:
Post a Comment