結果

問題 No.8093 Please GCD
ユーザー ああいい
提出日時 2022-04-01 22:43:22
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 436 bytes
コンパイル時間 453 ms
コンパイル使用メモリ 81,996 KB
実行使用メモリ 93,724 KB
平均クエリ数 446.17
最終ジャッジ日時 2024-11-20 10:47:48
合計ジャッジ時間 7,504 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 21 WA * 9
権限があれば一括ダウンロードができます

ソースコード

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