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

Home > Just Math
Floor Ratio Crossed Last Two Digits (Posted on 2023-09-21) Difficulty: 3 of 5
Determine the last two digits of this expression:
āŒŠ(10^2222)/(10^774+3)āŒ‹
Notes:
1) āŒŠnāŒ‹ is the floor of n, that is, the greatest integer less than or equal to n.
2) Computer program/excel solver assisted solutions are welcome, but a semi-analytic (p&p and hand calculator) methodology is preferred.

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 1 of 3
The last 2 digits are: 00

It looks like the exact answer for the greatest integer is:
a string of 773 9s
then a 7
then a string of 674 zeros
then the remainder is 9*10^674

--------------
numer = '1' + '0'*2222
denom = int('1' + '0'*773 + '3')

def large_divide(divisor, dividend):
    if type(dividend) == str:
        dividend = [int(i) for i in dividend]
    elif type(dividend) == int:
        dividend = [int(i) for i in str(dividend)]
    quotient = []
    tempdividend = 0
    i=0
    for i,v in enumerate(dividend):
        tempdividend = tempdividend*10 + dividend[i]
        quotient.append(tempdividend // divisor)
        tempdividend = tempdividend % divisor
    wholepart = ''.join([str(j) for j in quotient])
    remainder = tempdividend
    ans = wholepart.lstrip('0')+'\nwith remainder '+ str(remainder)
    return ans

print(large_divide(denom, numer))

--------------  Output
999999999999999999999999999999999999999999999999999999
999999999999999999999999999999999999999999999999999999
999999999999999999999999999999999999999999999999999999
999999999999999999999999999999999999999999999999999999
999999999999999999999999999999999999999999999999999999
999999999999999999999999999999999999999999999999999999
999999999999999999999999999999999999999999999999999999
999999999999999999999999999999999999999999999999999999
999999999999999999999999999999999999999999999999999999
999999999999999999999999999999999999999999999999999999
999999999999999999999999999999999999999999999999999999
999999999999999999999999999999999999999999999999999999
999999999999999999999999999999999999999999999999999999
999999999999999999999999999999999999999999999999999999
999999999999999997000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000
with remainder 900000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000
000000000000000000000000000

  Posted by Larry on 2023-09-21 13:10:48
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 (13)
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