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

lowest common factor of 24 , 36 and 40 is?

2 Answers  


Three containers A, B and C have volumes a, b, and c respectively; and container A is full of water while the other two are empty. If from container A water is poured into container B which becomes 1/3 full, and into container C which becomes 1/2 full, how much water is left in container A?

0 Answers   iNautix, Wipro,


City B is 5 miles east of City A. City C is 10 miles southeast of City B. Which of the following is the closest to the distance from City A to City C?

0 Answers   Wipro,


A son and father goes for boating in river upstream . After rowing for 1 mile son notices the hat of his fathe falling in the river. After 5 min. he tells his father that his hat has fallen. So they turn around and are able to pick the hat at the point from where they began boating after 5 min. Tell the speed of river.

0 Answers   Cognizant,


X < 0, Y <> 0 then what is the possibility that the result is always positive?

0 Answers   Hexaware,






0.23 + 0.02323 + 0.002323.... == ???

8 Answers   Integra,


Adam stands facing towards northwest direction.He walks 61 m and then turns southwards and walks another 60 m. How far is he from the starting point.?

0 Answers   Mecon,


what is the probability that 4 numbers selected from 1 to 40 are not consecutive.

4 Answers   TCS,


Convert the decimal number 310 to the base 6.

0 Answers   TCS,


2. 10 people are there, they are shaking hands together, how many hand shakes possible, if they are in no pair of cyclic sequence.

7 Answers   L&T, TCS,


1027.05 ? 314.005 + 112.25 = ? (a) 825.395 (b) 825.095 (c) 825.305 (d) 825.295 (e) None of these

7 Answers   CTS,


i want the question paer of godrej boyance company in chennai who are onducting technical test for mechanical engg graduates

0 Answers   Godrej,


Categories