Notes
This function is in beta test. Please help improve it in the issues
here.
Hints
Your answer may be identical to the JOJ answer in the first several lines.
However, you will still get Wrong Answer because the complete output may be longer and there might be errors in the future lines.
Please double check your code to solve this problem and try again.
Your Answer
100:0 50:1424 20:0 10:0 5:0 1:0 SUM:71200 100:64 50:1487 20:64 10:69 5:52 1:60 SUM:83040 100:2047 50:1487 20:2681 10:69 5:52 1:60 SUM:333680 100:2047 50:1487 20:3982 10:69 5:52 1:60 SUM:359700 100:3801 50:1512 20:4004 10:110 5:1113 1:88 SUM:542533 100:3801 50:1512 20:4004 10:110 5:1113 1:88 SUM:542533 100:3801 50:1512 20:4004 10:110 5:1113 1:88 SUM:542533 100:3867 50:1594 20:4096 10:188 5:1188 1:1479 SUM:557619 100:5152 50:3592 20:7124 10:213 5:1218 1:1500 SUM:847000 100:5152 50:3592 20:7124 10:213 5:1218 1:1500 SUM:847000 100:5152 50:3592 20:7124 10:213 5:1218 1:1500 SUM:847000 100:5165 50:4805 20:7146 10:238 5:1234 1:1521 SUM:909741 100:5165 50:4805 20:7146 10:238 5:1234 1:1521 SUM:909741 100:5165 50:4805 20:7146 10:238 5:1234 1:1521 SUM:909741 100:5199 50:4826 20:7174 10:259 5:1273 1:3280 SUM:916915 100:5199 50:4826 20:7174 10:2081 5:1273 1:3280 SUM:935135 100:5199 50:4826 20:7174 10:2081 5:1273 1:3280 SUM:935135 100:5199 50:4826 20:7174 10:2081 5:1273 1:3280 SUM:935135 100:5219 50:4845 20:7188 10:2091 5:3
JOJ Answer
100: 0 50 : 1424 20 : 0 10 : 0 5 : 0 1 : 0 Sum: 71200 SUCCESS SUCCESS 100: 33 50 : 1485 20 : 63 10 : 67 5 : 52 1 : 55 Sum: 79795 100: 2016 50 : 1485 20 : 2680 10 : 67 5 : 52 1 : 55 Sum: 330435 100: 2016 50 : 1485 20 : 3981 10 : 67 5 : 52 1 : 55 Sum: 356455 SUCCESS 100: 3765 50 : 1510 20 : 4003 10 : 107 5 : 1113 1 : 82 Sum: 538777 100: 3765 50 : 1510 20 : 4003 10 : 107 5 : 1113 1 : 82 Sum: 538777 100: 3765 50 : 1510 20 : 4003 10 : 107 5 : 1113 1 : 82 Sum: 538777 SUCCESS SUCCESS SUCCESS 100: 3785 50 : 1590 20 : 4094 10 : 184 5 : 1188 1 : 1468 Sum: 549128 SUCCESS 100: 5066 50 : 3588 20 : 7122 10 : 209 5 : 1217 1 : 1486 Sum: 838101 100: 5066 50 : 3588 20 : 7122 10 : 209 5 : 1217 1 : 1486 Sum: 838101 100: 5066 50 : 3588 20 : 7122 10 : 209 5 : 1217 1 : 1486 Sum: 838101 SUCCESS 100: 5064 50 : 4800 20 : 7142 10 : 234 5 : 1233 1 : 1507 Sum: 899252 100: 5064 50 : 4800 20 : 7142 10 : 234 5 : 1233 1 : 1507 Sum: 899252 100: 5064 50 : 4800 20 : 7142 10 : 234 5 : 1233 1 : 1507 Sum: 899252 SUCCESS