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

Home > Numbers
The Big Division (Posted on 2019-11-18) Difficulty: 3 of 5
What is the remainder when 232323...232323 (4018 digits) is divided by 999?

No Solution Yet Submitted by Danish Ahmed Khan    
No Rating

Comments: ( Back to comment list | You must be logged in to post comments.)
Solution Solution | Comment 1 of 5
991

The following program simulates long division taking the digits 2 at a time, but only keeps track of the remainder.

digits = 4018
location = 0
remainder = 0
while digits>0:
    divisor = remainder*100 + 23
    remainder = divisor % 999
    location += 2
    digits -= 2

print(location,remainder)

Output:  4018 991

----
Also note that the remainders follow a repeating pattern of period 27.
(but if you did this one digit at a time, I expect the cycle would be of period 54)

  Posted by Larry on 2019-11-18 08:11:17
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 (0)
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