ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1206. Sum of Digits of the Sum of Numbers

Some hints (DONT read this if you want to think yourself)
Posted by Fokysnik 14 Aug 2006 18:20
The equality holds when the sum of i-th digits of numbers A and B (A[i]+B[i]<=9)
Using this write a simple program. It will be a TL program but...
try running it for k=1,2,3,4,5,6,7 and you should notice a rule how the answer for k+1 is formed.

And one more thing. You should use long arithmetics. For k=50 answer has 87 digits.

Good luck.
Re: Some hints (DONT read this if you want to think yourself)
Thanks!