Consider a function which, for a given whole number n,
returns the number of ones required when writing out all
numbers between 0 and n. For example, f(13)=6. Notice that
f(1)=1. What is the next largest n such that f(n)=n?

Answers were Sorted based on User's Feedback



Consider a function which, for a given whole number n, returns the number of ones required when wri..

Answer / blahblahblah

#1: N = 1, f(N) = 1
#2: N = 199981, f(N) = 199981
#3: N = 199982, f(N) = 199982
#4: N = 199983, f(N) = 199983
#5: N = 199984, f(N) = 199984
#6: N = 199985, f(N) = 199985
#7: N = 199986, f(N) = 199986
#8: N = 199987, f(N) = 199987
#9: N = 199988, f(N) = 199988
#10: N = 199989, f(N) = 199989
#11: N = 199990, f(N) = 199990
#12: N = 200000, f(N) = 200000
#13: N = 200001, f(N) = 200001
#14: N = 1599981, f(N) = 1599981
#15: N = 1599982, f(N) = 1599982

Is This Answer Correct ?    7 Yes 0 No

Consider a function which, for a given whole number n, returns the number of ones required when wri..

Answer / sk

Next Largest NO such that f(n) = n is
199981

Is This Answer Correct ?    4 Yes 0 No

Consider a function which, for a given whole number n, returns the number of ones required when wri..

Answer / tihor

its is 1599990

Is This Answer Correct ?    1 Yes 5 No

Consider a function which, for a given whole number n, returns the number of ones required when wri..

Answer / suman

f(2) = 1
f(20)= 12
f(200) = 140
f(2000) = 1600
f(20000) = 18000
f(200000) = 200000

200,000 is the answere

Is This Answer Correct ?    0 Yes 6 No

Post New Answer

More General Aptitude Interview Questions

During a given week A programer spends 1/4 of his time preparing flow chart, 3/8 of his time coding and the rest of the time in debugging the programs. If he works 48 hours during the week , how many hours did he spend debugging the program.

13 Answers   L&T, TCS,


On cutting which solid parabola would be generated

3 Answers   Geometric Software,


wind flows 160 miles in 330 min, for 80 miles how much time required.

0 Answers   Accenture,


Find the missing word(...),ayw,gec,mki,sqo

0 Answers   IIT Delhi,


if today is 14 july 2004 is sunday, what is 17 september 1871

4 Answers   Satyam,






A pole seen from a certain distance at an angle of 15 degrees and 100 meters ahead by 30 degrees. What is the height of pole ?

6 Answers   L&T, Lucent,


One skirt requires 3.75 yards of cloth. How many skirts you can make from 45 yards?

0 Answers   BPCL Bharat Petroleum, Sonata,


Nationalism of Dalai Lama?

3 Answers   Yardi,


in a market 4 man are standing .the average age of the four before 4years is 45,aftyer some days one man is added and his age is 49.what is the average weight of all?

0 Answers   TCS,


If Dev walks 30 miles/hr. he reaches 1 hour before and if he walks with a speed of 20 miles/hr. he reach 1 hour late. Find the distance between 2 points and the exact time of reaching destination is 11 am then find the speed with which he walks.

0 Answers   Cap Gemini,


Mary's father's brother is Andrews Andrews daughter's son is Sunil Brothers name is Sam Who is Sam to Sunil?

0 Answers   Amdocs, Apps Associates,


Bird : Fly : : Snake : ? (A) Timid (B) Clatter (C) Crawl (D) Hole

8 Answers  


Categories