結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 60 ms
24,040 KB
testcase_01 WA -
testcase_02 AC 517 ms
24,040 KB
testcase_03 AC 516 ms
24,300 KB
testcase_04 AC 87 ms
24,012 KB
testcase_05 AC 96 ms
24,000 KB
testcase_06 AC 104 ms
23,656 KB
testcase_07 AC 108 ms
24,056 KB
testcase_08 AC 111 ms
24,012 KB
testcase_09 AC 118 ms
23,588 KB
testcase_10 AC 130 ms
23,892 KB
testcase_11 AC 141 ms
24,240 KB
testcase_12 AC 144 ms
24,336 KB
testcase_13 AC 148 ms
23,528 KB
testcase_14 AC 165 ms
23,664 KB
testcase_15 AC 193 ms
23,732 KB
testcase_16 AC 216 ms
23,660 KB
testcase_17 AC 234 ms
23,652 KB
testcase_18 AC 244 ms
24,116 KB
testcase_19 AC 275 ms
23,744 KB
testcase_20 AC 308 ms
23,616 KB
testcase_21 AC 170 ms
23,640 KB
testcase_22 AC 197 ms
24,360 KB
testcase_23 AC 244 ms
23,836 KB
testcase_24 AC 269 ms
24,336 KB
testcase_25 AC 55 ms
24,372 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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