結果

問題 No.3093 Please GCD
ユーザー ああいいああいい
提出日時 2022-04-01 22:47:02
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 436 bytes
コンパイル時間 214 ms
コンパイル使用メモリ 82,516 KB
実行使用メモリ 94,208 KB
平均クエリ数 434.37
最終ジャッジ日時 2024-04-30 15:08:42
合計ジャッジ時間 7,040 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 65 ms
68,764 KB
testcase_01 AC 62 ms
69,424 KB
testcase_02 AC 77 ms
75,352 KB
testcase_03 AC 103 ms
77,384 KB
testcase_04 AC 66 ms
71,008 KB
testcase_05 WA -
testcase_06 AC 97 ms
78,464 KB
testcase_07 AC 190 ms
84,676 KB
testcase_08 AC 82 ms
77,852 KB
testcase_09 AC 75 ms
74,552 KB
testcase_10 AC 63 ms
68,856 KB
testcase_11 AC 84 ms
76,852 KB
testcase_12 AC 68 ms
69,624 KB
testcase_13 WA -
testcase_14 WA -
testcase_15 AC 64 ms
69,432 KB
testcase_16 AC 74 ms
75,348 KB
testcase_17 WA -
testcase_18 WA -
testcase_19 WA -
testcase_20 AC 80 ms
75,768 KB
testcase_21 AC 72 ms
77,168 KB
testcase_22 AC 84 ms
76,340 KB
testcase_23 WA -
testcase_24 AC 71 ms
75,852 KB
testcase_25 AC 81 ms
76,576 KB
testcase_26 AC 73 ms
76,900 KB
testcase_27 WA -
testcase_28 WA -
testcase_29 AC 67 ms
75,612 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())

import sys

now = 1
dat = [0] * (N + 1)
while True:
    for i in range(2,N // now + 2):
        if now * i > N:
            print("!",now)
            exit()
        if dat[now * i] == 1:continue
        print("?",now*i)
        s = int(input())
        if s == now * i:
            now = now * i
            break
        else:
            for j in range(now*i,N+1,now*i):
                dat[j] = 1
                
0