编号 题目 状态 分数 总时间 内存 代码 / 答案文件 提交者 提交时间
#80833 #1028. 小秋的完美数字 Accepted 100 66 ms 2824 K Python 3 / 463 B 2022-08-02 22:58:52
from sys import stdout

x = 5 * 10 ** 8
print(x)
stdout.flush()
while int(input()) == 1:
    print(x // 2)
    stdout.flush()
    x = x // 2
l = x
r = 2 * x + 1
print((l + r) // 2)
stdout.flush()
while 1:
    cc = int(input())
    if cc == 1:
        r = (l + r) // 2
        print((l + r) // 2)
        stdout.flush()
    elif cc == -1:
        l = (l + r) // 2
        print((l + r) // 2)
        stdout.flush()
    else:
        break
子任务 #1
Accepted
得分:100
测试点 #1
Accepted
得分:100
用时:13 ms
内存:2760 KiB

输入文件(data1.in

17

系统信息

Exited with return code 0
测试点 #2
Accepted
得分:100
用时:12 ms
内存:2776 KiB

输入文件(data2.in

1
测试点 #3
Accepted
得分:100
用时:14 ms
内存:2784 KiB

输入文件(data3.in

1000000000

系统信息

Exited with return code 0
测试点 #4
Accepted
得分:100
用时:13 ms
内存:2824 KiB

输入文件(data4.in

154236798

系统信息

Exited with return code 0
测试点 #5
Accepted
得分:100
用时:14 ms
内存:2784 KiB

输入文件(data5.in

114514

系统信息

Exited with return code 0