Пример #1
0
from myfunc import sum_of_digits

max = 0
for a in xrange(100):
  for b in xrange(100):
    sum = sum_of_digits(a**b)
    if (sum > max):
      max = sum
print max
Пример #2
0
from myfunc import sum_of_digits

count = 0
for i in xrange(10**9):
  if (sum_of_digits(i) == sum_of_digits(137*i)):
    count += 1
print count
Пример #3
0
from myfunc import sum_of_digits

print sum_of_digits(2**1000)