mirror of
https://github.com/Xevion/contest.git
synced 2026-01-31 08:23:51 -06:00
update spaced icpc contest folder to kebab case repository formatting
This commit is contained in:
@@ -0,0 +1 @@
|
||||
24
|
||||
@@ -0,0 +1 @@
|
||||
25
|
||||
@@ -0,0 +1 @@
|
||||
987654321
|
||||
@@ -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()
|
||||
Reference in New Issue
Block a user