結果

問題 No.3056 量子コンピュータで素因数分解 Easy
ユーザー 👑 MizarMizar
提出日時 2022-09-28 15:38:23
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
(最新)
AC  
(最初)
実行時間 -
コード長 138 bytes
コンパイル時間 104 ms
コンパイル使用メモリ 10,664 KB
実行使用メモリ 24,360 KB
平均クエリ数 2.00
最終ジャッジ日時 2023-08-30 06:59:53
合計ジャッジ時間 6,658 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 66 ms
23,684 KB
testcase_01 WA -
testcase_02 AC 518 ms
23,572 KB
testcase_03 AC 515 ms
24,360 KB
testcase_04 AC 85 ms
24,336 KB
testcase_05 AC 95 ms
23,668 KB
testcase_06 AC 104 ms
24,324 KB
testcase_07 AC 107 ms
23,788 KB
testcase_08 AC 112 ms
23,772 KB
testcase_09 AC 119 ms
23,764 KB
testcase_10 AC 129 ms
24,048 KB
testcase_11 AC 140 ms
23,732 KB
testcase_12 AC 146 ms
24,240 KB
testcase_13 AC 149 ms
23,716 KB
testcase_14 AC 165 ms
23,692 KB
testcase_15 AC 192 ms
23,692 KB
testcase_16 AC 218 ms
24,024 KB
testcase_17 AC 236 ms
24,036 KB
testcase_18 AC 242 ms
23,636 KB
testcase_19 AC 275 ms
23,952 KB
testcase_20 AC 309 ms
23,532 KB
testcase_21 AC 172 ms
23,868 KB
testcase_22 AC 197 ms
23,936 KB
testcase_23 AC 243 ms
23,592 KB
testcase_24 AC 267 ms
23,668 KB
testcase_25 AC 55 ms
23,548 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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