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 1009. K-based Numbers

Please explain in detail
Posted by Siroj Matchanov [TUIT] 26 Jul 2011 13:12
1010230 is a valid 7-digit number;
1000198 is not a valid number; -------------[WHY??]
0001235 is not a 7-digit number, it is a 4-digit number.


so if N=3 K=10:
100 can't be a valid number? (Because it has two continuous zeros ?)
but 101 is a valid number, right?

Please provide me with more examples...
Re: Please explain in detail
Posted by pyh119 27 Jul 2011 17:52
We define a number to be valid if its K-based notation doesn’t contain two successive zeros.

1000198 has three successive zeros,so it is invalid.

Of course,100 is invalid where 101 is valid.