feat(runner): compile Go and check answers per test group
This commit is contained in:
1 parent
e95c681165
commit
afee564bf4
61 files changed
+2592
-143
No files matched your search
+12
@@ -0,0 +1,12 @@
|
||||
# Prints any pair of 1-based positions whose values add up to the target.
|
||||
import sys
|
||||
|
||||
lines = sys.stdin.read().split("\n")
|
||||
target = int(lines[0])
|
||||
values = [int(token) for token in lines[1].split()]
|
||||
seen = {}
|
||||
for position, value in enumerate(values, start=1):
|
||||
if target - value in seen:
|
||||
print(seen[target - value], position)
|
||||
break
|
||||
seen.setdefault(value, position)
|
||||
Reference in new issue
Block a user