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 1013. K-based Numbers. Version 3

Hello, could you check if my test is correct?
4
10
1234
Answer: 222 (??)
~Thanks
my answer is: 191
Why the answer is 191? As far as I understand, we need to count numbers from 1000 to 1234 without 00. There are only 12 of them:
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1100
1200
So 1234 - 1000 - 12 = 222. Where am I wrong? Thanks.
> As far as I understand, we need to count numbers from 1000 to 1234 without 00

No. We need to count numbers from 1000 to 9999 without 00.
Result - 8829 - we should divide by 1234 - 7, remainder 191.
Remainder is the answer.

So answer is 191.

Edited by author 26.12.2016 15:11
My answer is also 191, but i got WA#3