NCPC26 initial commit

This commit is contained in:
Zacharias committed 2026-10-03 09:48:59 +02:00
commit fbd41d8ac7
20 files changed
+635

No files matched your search

+23
View File
@@ -0,0 +1,23 @@
import sys
l = 0
r = 1001
m = 500
temp = m
for i in range(10):
print(m)
sys.stdout.flush()
term = input()
if term == "correct":
exit()
elif term == "lower":
temp = m
m = (l + m) // 2
r = temp
else:
temp = m
m = (m + r) // 2
l = temp
+12
View File
@@ -0,0 +1,12 @@
ball = 1
for i in range(5):
j = int(input())
k = int(input())
if j == ball:
ball = k
elif k == ball:
ball = j
print(ball)
+4
View File
@@ -0,0 +1,4 @@
w = int(input())
l = int(input())
print(w*l)