結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 107 ms
86,288 KB
testcase_01 AC 101 ms
82,296 KB
testcase_02 AC 140 ms
93,436 KB
testcase_03 AC 145 ms
93,836 KB
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 AC 110 ms
88,772 KB
testcase_08 WA -
testcase_09 AC 130 ms
93,728 KB
testcase_10 AC 90 ms
81,276 KB
testcase_11 AC 126 ms
88,656 KB
testcase_12 AC 145 ms
93,924 KB
testcase_13 WA -
testcase_14 WA -
testcase_15 WA -
testcase_16 WA -
testcase_17 AC 140 ms
90,108 KB
testcase_18 AC 112 ms
92,364 KB
testcase_19 AC 243 ms
96,112 KB
testcase_20 AC 160 ms
94,444 KB
testcase_21 WA -
testcase_22 AC 134 ms
88,888 KB
testcase_23 WA -
testcase_24 WA -
testcase_25 WA -
testcase_26 WA -
testcase_27 WA -
testcase_28 WA -
testcase_29 AC 124 ms
93,404 KB
権限があれば一括ダウンロードができます

ソースコード

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)
    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(),flush = True)
    
0