Advertisement
Guest User

Untitled

a guest
Dec 26th, 2012
241
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.40 KB | None | 0 0
  1. def maxmod(number):
  2.     counter=0
  3.     maxmod=0
  4.     while counter < number:
  5.         if (counter*counter)%number>maxmod:
  6.             maxmod=(counter*counter)%number
  7.         counter=counter+1
  8.     return maxmod
  9.  
  10. def sumationof():
  11.     counter=1
  12.     sumation=0
  13.     while counter<=10000000:
  14.         sumation=sumation+maxmod(counter)
  15.         counter=counter+1
  16.     return sumation
  17.  
  18. print sumationof()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement