Go Back   Forums > Community Chatterbox > Tech Corner > Programming
Memberlist Forum Rules Today's Posts
Search Forums:
Click here to use Advanced Search

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Old 01-03-2005, 09:20 PM   #11
NrmMyth
Hero Gamer

 
Join Date: Jan 2005
Location: ,
Posts: 454
Thumbs down

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!
NrmMyth is offline                         Send a private message to NrmMyth
Reply With Quote
 


Similar Threads
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


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump
 


The current time is 08:46 AM (GMT)

 
Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.