結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 RE -
testcase_01 AC 67 ms
24,072 KB
testcase_02 AC 109 ms
24,336 KB
testcase_03 AC 108 ms
24,184 KB
testcase_04 AC 62 ms
24,100 KB
testcase_05 AC 61 ms
24,360 KB
testcase_06 AC 61 ms
24,276 KB
testcase_07 AC 58 ms
23,552 KB
testcase_08 AC 62 ms
23,444 KB
testcase_09 AC 62 ms
24,024 KB
testcase_10 AC 64 ms
23,492 KB
testcase_11 AC 83 ms
23,656 KB
testcase_12 AC 109 ms
23,612 KB
testcase_13 AC 64 ms
23,876 KB
testcase_14 AC 161 ms
23,784 KB
testcase_15 AC 174 ms
23,720 KB
testcase_16 AC 73 ms
23,484 KB
testcase_17 AC 76 ms
24,372 KB
testcase_18 AC 78 ms
24,036 KB
testcase_19 AC 166 ms
23,756 KB
testcase_20 AC 95 ms
23,556 KB
testcase_21 AC 73 ms
23,636 KB
testcase_22 AC 84 ms
24,128 KB
testcase_23 AC 84 ms
23,976 KB
testcase_24 AC 78 ms
23,532 KB
testcase_25 AC 54 ms
23,472 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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