From 1879caa1dd80cb11dd62403663917ad4bf7cc68e Mon Sep 17 00:00:00 2001 From: Charles Date: Sun, 11 Aug 2019 22:41:34 +0200 Subject: rename all file with 3 zero padding --- python/016-power_digit_sum.py | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 python/016-power_digit_sum.py (limited to 'python/016-power_digit_sum.py') diff --git a/python/016-power_digit_sum.py b/python/016-power_digit_sum.py new file mode 100644 index 0000000..584ba67 --- /dev/null +++ b/python/016-power_digit_sum.py @@ -0,0 +1,5 @@ +two_power_thousand = 2 ** 1000 + +list_of_digits = [int(dgt) for dgt in list(str(two_power_thousand))] + +print(sum(list_of_digits)) -- cgit