結果

問題 No.3093 Please GCD
ユーザー ShirotsumeShirotsume
提出日時 2022-04-01 22:01:25
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 475 bytes
コンパイル時間 156 ms
コンパイル使用メモリ 82,380 KB
実行使用メモリ 98,708 KB
平均クエリ数 601.00
最終ジャッジ日時 2024-04-30 14:01:55
合計ジャッジ時間 10,136 ms
ジャッジサーバーID
(参考情報)
judge3 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 WA -
testcase_03 AC 311 ms
97,784 KB
testcase_04 AC 133 ms
90,788 KB
testcase_05 WA -
testcase_06 AC 143 ms
94,460 KB
testcase_07 WA -
testcase_08 AC 140 ms
94,100 KB
testcase_09 WA -
testcase_10 AC 105 ms
83,112 KB
testcase_11 WA -
testcase_12 WA -
testcase_13 AC 126 ms
87,464 KB
testcase_14 WA -
testcase_15 AC 118 ms
88,500 KB
testcase_16 WA -
testcase_17 WA -
testcase_18 AC 131 ms
89,612 KB
testcase_19 WA -
testcase_20 AC 137 ms
90,092 KB
testcase_21 WA -
testcase_22 AC 128 ms
87,884 KB
testcase_23 WA -
testcase_24 WA -
testcase_25 AC 146 ms
93,708 KB
testcase_26 WA -
testcase_27 WA -
testcase_28 WA -
testcase_29 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
input = lambda: sys.stdin.readline().rstrip()
ii = lambda: int(input())
mi = lambda: map(int, input().split())
li = lambda: list(mi())


n = ii()
ans = list(range(1, n + 1))
import random
for _ in range(600):
    now = random.choice(ans[:max(1, len(ans) // 2)])
    print('?', now, flush = True)
    s = ii()
    if s == -1:
        exit()
    ans2 = []
    for v in ans:
        if v % s == 0:
            ans2.append(v)
    ans = ans2

print('!', ans.pop())
    
0