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.
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 |