mid-kid
4 years ago
3 changed files with 1034 additions and 0 deletions
@ -0,0 +1,32 @@ |
|||
#!/usr/bin/env python3 |
|||
|
|||
from sys import argv |
|||
|
|||
i = [int(x.strip()) for x in open(argv[1])] |
|||
|
|||
pre = 25 |
|||
if len(argv) > 2: |
|||
pre = int(argv[2]) |
|||
|
|||
for x in range(pre, len(i)): |
|||
n = i[x] |
|||
for y in i[x-pre:x]: |
|||
if n-y in i[x-pre:x]: |
|||
break |
|||
else: |
|||
print(n) |
|||
for y in range(len(i)): |
|||
p = y |
|||
c = 0 |
|||
while p < len(i): |
|||
c += i[p] |
|||
if c == n: |
|||
r = i[y:p+1] |
|||
print(min(r)+max(r)) |
|||
break |
|||
if c > n: |
|||
break |
|||
p += 1 |
|||
if c == n: |
|||
break |
|||
break |
File diff suppressed because it is too large
@ -0,0 +1,2 @@ |
|||
1930745883 |
|||
268878261 |
Loading…
Reference in new issue