Rebased projecteuler folder, now includes all contest programming stuff
This commit is contained in:
20
projecteuler/016/main.py
Normal file
20
projecteuler/016/main.py
Normal file
@@ -0,0 +1,20 @@
|
||||
import os
|
||||
import math
|
||||
import numpy as np
|
||||
|
||||
# Find the sum of all the digits of 2 ^ 1000
|
||||
|
||||
def main():
|
||||
print("Hello, this is Patrick")
|
||||
|
||||
p = pow(2, 1000)
|
||||
s = str(p)
|
||||
|
||||
r = 0
|
||||
for c in s:
|
||||
r = r + int(c)
|
||||
|
||||
print(r)
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
Reference in New Issue
Block a user