From 8270ca448dd86517468872d9fc26f0f5d402864a Mon Sep 17 00:00:00 2001 From: kartofen Date: Wed, 12 Apr 2023 23:33:50 +0300 Subject: cirlce-thingy done --- main.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 main.py (limited to 'main.py') diff --git a/main.py b/main.py new file mode 100644 index 0000000..43f0e01 --- /dev/null +++ b/main.py @@ -0,0 +1,15 @@ +def sum_digits(n): + s = 0 + while n: + s += n % 10 + n //= 10 + return s + +n = 0 +dig_sum = sum_digits(n) +for i in range(3): + n = n*10 + 9; + + for i in range(1, 200): + power = pow(n, i); + print(n, "^", i, "=", power, ';', sum_digits(power), power % 9); -- cgit v1.2.3