A Number Theory Problem By Akshay

Find The Last Three digits of 2 1 568 21^{568}


The answer is 561.

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

1 solution

1
2
3
4
5
6
7
temp = 1
for i in range(1,569):
    temp *= 21
    temp %= 1000

print temp 
# temp %= 1000 limits the value of temp to avoid overflow

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...