move all contest solutions into proper practice folder in prep for real problem solution

This commit is contained in:
Xevion
2020-02-29 20:51:26 -06:00
parent 2f3aa0eefe
commit b45e925605
17 changed files with 0 additions and 0 deletions

View File

@@ -0,0 +1 @@
24

View File

@@ -0,0 +1 @@
25

View File

@@ -0,0 +1 @@
987654321

View File

@@ -0,0 +1,17 @@
import os, sys
def harshad(n):
return (n % sum(map(int, list(str(n))))) == 0
def main():
inputs = [os.path.join(sys.path[0], 'inputs', x) for x in
os.listdir(os.path.join(sys.path[0], 'inputs'))]
inputs = [int(open(path).read()) for path in inputs]
for i in inputs:
while not harshad(i):
i += 1
print(i)
if __name__ == "__main__":
main()