[Problem 44]

Back to General discussions forum

wtom wtom     2017-02-03 10:51:46

Hi! Looks like example's answer is wrong

Example input data: 7 193170145 1912748246 753156389 614113621 1824520917 53700559 1288077384 911939603 1939066598 1695763253 1905581606 1811712139 878644967 1090885451

answer: 5 8 6 7 9 5 12

or I missing something.

Quandray     2017-02-03 11:11:08
User avatar

What do you think the example answer should be, and how did you calculate it?

wtom wtom     2017-02-03 14:27:42

for 193170145 1912748246 as example 193170145 % 6 + 1912748246 % 6 + 2 = 5 + 0 + 2 = 7

tonychamberlain     2017-02-03 23:47:35

Your math is wrong. I'm not sure if it was a typo in entering a calculator or some bug in your code:

193170145 % 6 = 193170145/6 = 32,195,024.166666 (remainder 1)

1912748246 % 6 = 1912748246/6 = 318,791,374.333333 (reaminder 2)

1 + 2 + 2 = 5

wtom wtom     2017-02-06 07:28:30

Yep... You are right. I have to sleep more )

Please login and solve 5 problems to be able to post at forum