Skip to content
This repository has been archived by the owner on Jun 11, 2024. It is now read-only.

Commit

Permalink
oops
Browse files Browse the repository at this point in the history
  • Loading branch information
glacialcascade committed Jun 9, 2024
1 parent db955a5 commit 55d67e3
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion snail-farmer-john/fast.out
Original file line number Diff line number Diff line change
@@ -1 +1 @@
bcactf{48919091920004982591394736478977215343309762472378}
bcactf{1256701987023223273425321367789648111580589191253}
2 changes: 1 addition & 1 deletion snail-farmer-john/input.txt

Large diffs are not rendered by default.

4 changes: 3 additions & 1 deletion snail-farmer-john/solve.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,10 @@
fout = open("fast.out", "w")
# Read the input
(n, k) = [int(x) for x in fin.readline().split(" ")]
arr = [int(x) for x in fin.readline().split(" ")]
assert len(arr) == k

sum = sum([int(x) for x in fin.readline().split(" ")])
sum = sum(arr)

start = sum + n - k + 1
out = 0
Expand Down
4 changes: 2 additions & 2 deletions snail-farmer-john/test_case_gen.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
k = 200000
fout = open("input.txt", "w")
fout.write(f"{n} {k}\n")
for (i, x) in enumerate([random.randint(1, 1000000) for _ in range(n)]):
for (i, x) in enumerate([random.randint(1, 1000000) for _ in range(k)]):
fout.write(f"{x}")
if i != n - 1:
if i != k - 1:
fout.write(" ")

0 comments on commit 55d67e3

Please sign in to comment.