結果

問題 No.3056 量子コンピュータで素因数分解 Easy
ユーザー 👑 MizarMizar
提出日時 2022-09-28 16:19:58
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
RE  
(最新)
AC  
(最初)
実行時間 -
コード長 123 bytes
コンパイル時間 118 ms
コンパイル使用メモリ 10,568 KB
実行使用メモリ 24,252 KB
平均クエリ数 3.04
最終ジャッジ日時 2023-08-30 07:00:12
合計ジャッジ時間 4,062 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 RE -
testcase_01 AC 65 ms
23,752 KB
testcase_02 AC 107 ms
24,232 KB
testcase_03 AC 109 ms
23,548 KB
testcase_04 AC 58 ms
23,560 KB
testcase_05 AC 60 ms
23,740 KB
testcase_06 AC 60 ms
23,508 KB
testcase_07 AC 58 ms
23,384 KB
testcase_08 AC 61 ms
23,700 KB
testcase_09 AC 62 ms
23,700 KB
testcase_10 AC 64 ms
23,568 KB
testcase_11 AC 82 ms
24,024 KB
testcase_12 AC 103 ms
24,192 KB
testcase_13 AC 61 ms
23,608 KB
testcase_14 AC 160 ms
23,892 KB
testcase_15 AC 173 ms
23,628 KB
testcase_16 AC 72 ms
23,548 KB
testcase_17 AC 73 ms
23,368 KB
testcase_18 AC 75 ms
23,988 KB
testcase_19 AC 164 ms
23,736 KB
testcase_20 AC 96 ms
23,844 KB
testcase_21 AC 73 ms
23,896 KB
testcase_22 AC 84 ms
23,848 KB
testcase_23 AC 83 ms
24,252 KB
testcase_24 AC 78 ms
23,700 KB
testcase_25 AC 56 ms
24,204 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import math;G=math.gcd;a=g=2;n=int(input())
while g<3:print("?",a);g=G(n,pow(a,int(input())//2,n)-1);a+=1
print("!",g,n//g)
0