From 1eaf67e3f05b099b9e61663205484b2222434716 Mon Sep 17 00:00:00 2001 From: Philippe Zwietering Date: Sat, 6 Mar 2021 17:51:52 +0100 Subject: [PATCH] Remember that 0^0 is not 0, or at least not implemented as such (what it truly is is a mystery) --- 48/main.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 48/main.py diff --git a/48/main.py b/48/main.py new file mode 100644 index 0000000..fef8d4c --- /dev/null +++ b/48/main.py @@ -0,0 +1,18 @@ +''' +The series, 11 + 22 + 33 + ... + 1010 = 10405071317. + +Find the last ten digits of the series, 11 + 22 + 33 + ... + 10001000. +''' + +def main(): + print("Hello this is Patrick") + + s = 0 + + for i in range(1,1001): + s += pow(i, i,10**10) + + print(s % 10**10) + +if __name__ == "__main__": + main() \ No newline at end of file