結果

問題 No.3056 量子コンピュータで素因数分解 Easy
ユーザー 👑 MizarMizar
提出日時 2022-09-29 12:19:17
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
(最新)
AC  
(最初)
実行時間 -
コード長 135 bytes
コンパイル時間 143 ms
コンパイル使用メモリ 10,732 KB
実行使用メモリ 24,324 KB
平均クエリ数 2.00
最終ジャッジ日時 2023-08-30 07:00:34
合計ジャッジ時間 6,660 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 63 ms
24,016 KB
testcase_01 WA -
testcase_02 AC 518 ms
24,316 KB
testcase_03 AC 510 ms
24,020 KB
testcase_04 AC 85 ms
23,608 KB
testcase_05 AC 96 ms
24,252 KB
testcase_06 AC 102 ms
23,596 KB
testcase_07 AC 108 ms
24,072 KB
testcase_08 AC 109 ms
24,024 KB
testcase_09 AC 118 ms
23,528 KB
testcase_10 AC 129 ms
23,600 KB
testcase_11 AC 141 ms
23,656 KB
testcase_12 AC 143 ms
24,276 KB
testcase_13 AC 147 ms
24,324 KB
testcase_14 AC 163 ms
23,736 KB
testcase_15 AC 188 ms
23,812 KB
testcase_16 AC 213 ms
23,552 KB
testcase_17 AC 231 ms
23,712 KB
testcase_18 AC 241 ms
23,880 KB
testcase_19 AC 274 ms
24,048 KB
testcase_20 AC 308 ms
23,636 KB
testcase_21 AC 172 ms
24,072 KB
testcase_22 AC 197 ms
23,700 KB
testcase_23 AC 242 ms
24,084 KB
testcase_24 AC 269 ms
23,756 KB
testcase_25 AC 56 ms
24,036 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import math;n=int(input());print("?",2);r=int(input());print("!",g:=max([math.gcd(n,pow(b,r//(2-r%2),n)-1)%n for b in range(99)]),n//g)
0