From 7b624de8e3e3637a07364f992c1d7e4185e4a872 Mon Sep 17 00:00:00 2001 From: Charles Date: Sun, 11 Aug 2019 18:42:52 +0200 Subject: initial commit --- python/16-power_digit_sum.py | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 python/16-power_digit_sum.py (limited to 'python/16-power_digit_sum.py') diff --git a/python/16-power_digit_sum.py b/python/16-power_digit_sum.py new file mode 100644 index 0000000..584ba67 --- /dev/null +++ b/python/16-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