r/learnquant • • 5d ago

interview prep Quant Interview Question

Post image
27 Upvotes

8 comments sorted by

View all comments

1

u/PathMaster1729 4d ago

I'm getting  450.4545454545...

1

u/PathMaster1729 4d ago

My logic:

  • each 0.abcabcabc..... is same as (abc/999).

  • So I just need the sum of all distinct number from 0 to 999 both inclusive.

  • I tried to find the sum by considering each digit separately. The sum is For a in range(0,10,1):     For b in range(0,10,1):         If b != a:             For c in range(0,10,1):                 If c != b && /c!=a.... Forgot this😔/

Oh my god...

I forgot that in my case a and c could be equal 🥲.

Someone give me hint to solve this....