結果

問題 No.3056 量子コンピュータで素因数分解 Easy
ユーザー 👑 MizarMizar
提出日時 2022-10-01 11:30:16
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 212 bytes
コンパイル時間 120 ms
コンパイル使用メモリ 10,632 KB
実行使用メモリ 24,568 KB
平均クエリ数 1.92
最終ジャッジ日時 2023-08-30 07:00:53
合計ジャッジ時間 3,717 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 63 ms
23,948 KB
testcase_01 WA -
testcase_02 AC 110 ms
24,276 KB
testcase_03 AC 108 ms
24,220 KB
testcase_04 AC 58 ms
24,084 KB
testcase_05 AC 60 ms
24,296 KB
testcase_06 AC 62 ms
23,888 KB
testcase_07 AC 61 ms
23,912 KB
testcase_08 AC 63 ms
24,148 KB
testcase_09 AC 62 ms
24,260 KB
testcase_10 AC 63 ms
23,728 KB
testcase_11 WA -
testcase_12 WA -
testcase_13 AC 62 ms
24,272 KB
testcase_14 WA -
testcase_15 WA -
testcase_16 AC 72 ms
24,496 KB
testcase_17 AC 76 ms
24,360 KB
testcase_18 AC 76 ms
24,508 KB
testcase_19 WA -
testcase_20 AC 98 ms
24,176 KB
testcase_21 AC 75 ms
24,164 KB
testcase_22 AC 72 ms
23,932 KB
testcase_23 AC 83 ms
24,224 KB
testcase_24 AC 78 ms
24,308 KB
testcase_25 AC 56 ms
23,936 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import math;n=int(input());P=lambda p:0 if(g:=math.gcd(p,n))<3 and g<n else[print("!",g,n//g),exit()];P(3);[[P(a),print("?",a),r:=int(input()),[P(pow(a+b,r//(2-(r&1)),n)-1)for b in range(99)]]for a in range(2,n)]
0