All about flooble | fun stuff | Get a free chatterbox | Free JavaScript | Avatars    
perplexus dot info

Home > Just Math
N Nine Nuance (Posted on 2016-01-29) Difficulty: 3 of 5
Determine the minimum value of a positive integer N > 2 such that:
the number 199...991, containing precisely N nines, is divisible by 1991.

See The Solution Submitted by K Sengupta    
Rating: 5.0000 (1 votes)

Comments: ( Back to comment list | You must be logged in to post comments.)
Solution computer solution | Comment 3 of 6 |
    5   open "n9nuance.txt" for output as #2
   10   Midpart=90:Ct9=1
   20   Frontpart=100
   30   while Done=0
   40     N=Frontpart+Midpart+1
   50     if N @ 1991=0 then
   60        :if N>1991 then Done=1:print #2,N:endif
   70     if Done then print Ct9
   80     Frontpart=Frontpart*10
   90     Midpart=(Midpart+9)*10:Ct9=Ct9+1
  100   wend
  110   close #2


finds 182 9's.

The number N is definitely 184 digits long, with 182 9's:


1999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999991


  Posted by Charlie on 2016-01-29 10:47:03
Please log in:
Login:
Password:
Remember me:
Sign up! | Forgot password


Search:
Search body:
Forums (0)
Newest Problems
Random Problem
FAQ | About This Site
Site Statistics
New Comments (14)
Unsolved Problems
Top Rated Problems
This month's top
Most Commented On

Chatterbox:
Copyright © 2002 - 2024 by Animus Pactum Consulting. All rights reserved. Privacy Information