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

got ac
1.start comapring digits from middle.
2.if rhs>lhs then increment middle digits by one using % operator.if digits have become zero carry on increment for next rhs and corrosponding lhs
3.for all other cond lhs=rhs
see test cases given on other message posting.good luck
additional hint
if u have visited step2 once u need not visit it again only step3 is sufficient.best of luck.