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 1493. One Step from Happiness

Why?
Posted by Sergey 2 Mar 2016 03:03
445219- No
4+4+5 = 13
2+1+9 = 12
13 and 12 = 1
Yes?
Why not?
Re: Why?
Posted by ToadMonster 2 Mar 2016 09:54
"I'm one step from happiness," Vova thought, "either the previous or the next ticket is lucky." Is he right?

So, you have to check if any of (445219-1) and (445219+1) is lucky.