結果
問題 |
No.8056 量子コンピュータで素因数分解 Easy
|
ユーザー |
👑 |
提出日時 | 2022-09-27 01:14:43 |
言語 | PHP (843.2) |
結果 |
WA
|
実行時間 | - |
コード長 | 183 bytes |
コンパイル時間 | 670 ms |
コンパイル使用メモリ | 32,404 KB |
実行使用メモリ | 49,532 KB |
平均クエリ数 | 3.00 |
最終ジャッジ日時 | 2024-12-31 20:17:04 |
合計ジャッジ時間 | 5,327 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | WA * 26 |
コンパイルメッセージ
No syntax errors detected in Main.php
ソースコード
import math;import random;G=math.gcd;a=g=2;n=int(input()) while g<3:print("?",a);t=pow(a,int(input())//2,n);a=random.randrange(3,n);g=max(G(n,t-1),G(n,t+1)%n,G(n,a)) print("!",g,n//g)