All submissions for this problem are available.
Hogwarts School of Witchcraft and Wizardry is known for moulding young minds into the finest wizards and witches. However that comes with a lot of practice. One of the young wizards cast a spell on a spider that makes it leap greater distances.
On observing closely the spider leaped 1 meter in its first leap. 10 meters in its second leap, 19 meters in its third leap , 28 meters in its fourth leap, 37 meters in its fifth leap and so on following a pattern.
In order to capture the spider, the young wizard must be able to tell the number of leaps the spider would take to reach a given distance.
The first line of input contains one integer T denoting the number of test cases The second line contains an integer N denoting a distance the spider has to cover.
OUTPUTFor each N you have to display the minimum number of leaps required to a cover a distance >=N in format Case #T: leaps, where leaps is answer for corresponding test case T.
1< T < 50
10 < N < 104
Case #1: 5
Case #2: 3
|Time Limit:||1 sec|
|Source Limit:||50000 Bytes|
|Languages:||C, CPP14, JAVA, PYTH, PYTH 3.6, PYPY, CS2, PAS fpc, PAS gpc, RUBY, PHP, GO, NODEJS, HASK, SCALA, D, PERL, FORT, WSPC, ADA, CAML, ICK, BF, ASM, CLPS, PRLG, ICON, SCM qobi, PIKE, ST, NICE, LUA, BASH, NEM, LISP sbcl, LISP clisp, SCM guile, JS, ERL, TCL, PERL6, TEXT, SCM chicken, CLOJ, FS|
Fetching successful submissions