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

ADMINS: Possible missing definition
Posted by Amndeep Singh Mann 24 Jan 2012 02:29
Now, I could be saying something stupid here.  But I think we're missing a definition of what happens at the topmost boundary.
Say our number is 999,999, if you subtract one, you don't get a lucky number, but if you add one, then what happens?
The problem said that it was going to be a 6 digit number at all times, but if you add one, it becomes a seven digit number, so does this case never occur?  And if it does, then does the lucky number formula apply only to the last 6 digits of the number?
Re: ADMINS: Possible missing definition
Posted by Sandro (USU) 24 Jan 2012 02:45
You are right. In fact all the tram tickets have exactly 6 digits, so ticket 1000000 doesn't exist. I have added this phrase to the hint.
Re: ADMINS: Possible missing definition
Posted by SquidBoy 24 Apr 2012 06:48
It doesn't really matter, because the problem definition says the sum of the first 3 and last 3 digits differs by one.  999,998 fits this definition, but 999,999 does not.