![]() |
#11 | ||
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Join Date: Jan 2005
Location: ,
Posts: 454
|
![]() So here is one good test for all you guys who are bored, or like chalenges.
I am posting this exam so my good friend Unknown Hero (who I know of) can take a little break. It is called "The Number" (be afraid, be very afraid) and shouldn't be hard. Here it goes. THE NUMBER When all natural numbers (1,2,3,4,5), started from 1 to some known N number write in a line one after another without a space, we get a array of numbers that looks like this: For N=16 we get { 12345678910111213141516 }. Write an algorithm/code that will calculate the exact number od digits of that array. INPUT: In one and only row there is one number N, 1<=N<=100,000,000. OUTPUT: In one and only row on screen you have to write the needed number from the text. TESTS: input 5 | 15 | 120 output 5 | 21 | 252 Good luck.
__________________
Never mess with me when I have a cougar, Never! |
||
![]() ![]() |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Discussion Of Exams | Kon-Tiki | Programming | 8 | 30-03-2007 07:27 PM |
How Often Do You Cheat On Exams / Tests | nace | Blah, blah, blah... | 40 | 16-10-2006 07:57 PM |
Solution To Exams | Kon-Tiki | Programming | 0 | 08-08-2005 05:37 PM |
Exams | Unknown Hero | Programming | 0 | 12-04-2005 08:40 PM |
|
|
||
  |