結果
問題 |
No.8093 Please GCD
|
ユーザー |
![]() |
提出日時 | 2022-04-01 22:45:14 |
言語 | PyPy3 (7.3.15) |
結果 |
TLE
|
実行時間 | - |
コード長 | 491 bytes |
コンパイル時間 | 299 ms |
コンパイル使用メモリ | 82,308 KB |
実行使用メモリ | 109,284 KB |
平均クエリ数 | 0.07 |
最終ジャッジ日時 | 2024-11-20 10:55:48 |
合計ジャッジ時間 | 92,711 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | RE * 1 TLE * 29 |
ソースコード
def eratosthenes(n): res=[0]*(n+1) prime=set([]) for i in range(2,n+1): if not res[i]: prime.add(i) for j in range(i,n+1,i): res[j]=1 return sorted(list(prime)) prime = eratosthenes(10**4) ans = 1 cnt=0 for p in prime: y=1 while True: cnt+=1 y*=p print(f"! {y}", flush=True) s=int(input()) if s==1:break if s==y:continue ans *= y//p print(f"! {ans}", flush=True)