ENG  RUSTimus Online Judge
Online Judge
Online contests
About Online Judge
Frequently asked questions
Site news
Problem set
Submit solution
Judge status
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
back to board

Discussion of Problem 1009. K-based Numbers

explain plz
Posted by giorgi 19 Nov 2011 16:35
if N=3 k=10
is 011 valid(i mean may the valid number start with 0?)
Re: explain plz
Posted by ichigo2908 30 May 2012 00:24
011 is actually 11 so no.
a small hint:

first, lets consider A ∈ { 1, 2, 3, ..., k-1}

the numbers that are invalid should look like this: A00, where A can take any value from those above. no matter what values do N and K take, your numbers must always start with A. if not, then u have a number with N-1 elements. hope this helps.
Re: explain plz
Posted by hehe 26 Mar 2013 14:56
this reply was quite late :-)