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 1123. Salary

Can't I use string
Posted by hz2zhh 12 Nov 2010 13:54
I WA at #4 but I don't know why

I have test many tests in the other topic
and my program can give a right answer

so who can help me
Re: Try this tests...
Posted by Enigma [UB of TUIT] 12 Nov 2010 15:08
Try this tests:
1999999 ans:2000002
90999   ans:91019
19992   ans:20002
0       ans:0
221121  ans:221122

Little hint:
Start comapring digits from middle.If right>left then increment middle digits by one using % operator.If digits have become zero carry on increment for next right and corrosponding left.For all other cond left=right
AC__0.078-1774 КБ