結果
問題 |
No.8093 Please GCD
|
ユーザー |
|
提出日時 | 2022-04-01 22:39:21 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 557 bytes |
コンパイル時間 | 154 ms |
コンパイル使用メモリ | 82,292 KB |
実行使用メモリ | 95,396 KB |
平均クエリ数 | 505.00 |
最終ジャッジ日時 | 2024-11-20 10:39:28 |
合計ジャッジ時間 | 11,075 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | WA * 6 RE * 24 |
ソースコード
from re import I N = int(input()) isp = [i>=2 for i in range(N+1)] for i in range(2,N+1): if not isp[i]:continue for j in range(i+i,N+1,i):isp[j] = False ans = 1 query = 1 cnt = 0 for i in range(2,N+1): if not isp[i]:continue now = 1 while now*i <= N:now*=i if query*now > N: print("?",query,flush=True) ans *= int(input()) cnt += 1 if cnt > 600: assert False query = now else: query *= now if query > 1: print("?",query,flush=True) ans *= int(input()) cnt += 1 if cnt > 600: assert False print(ans)