結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 61 ms
24,072 KB
testcase_01 AC 62 ms
23,796 KB
testcase_02 AC 108 ms
24,480 KB
testcase_03 AC 111 ms
24,568 KB
testcase_04 AC 60 ms
23,880 KB
testcase_05 AC 60 ms
24,036 KB
testcase_06 AC 62 ms
23,892 KB
testcase_07 AC 59 ms
24,620 KB
testcase_08 AC 63 ms
23,796 KB
testcase_09 AC 63 ms
24,552 KB
testcase_10 AC 64 ms
24,080 KB
testcase_11 AC 65 ms
24,268 KB
testcase_12 AC 71 ms
24,492 KB
testcase_13 AC 61 ms
24,288 KB
testcase_14 AC 74 ms
24,500 KB
testcase_15 AC 81 ms
23,876 KB
testcase_16 AC 72 ms
24,252 KB
testcase_17 AC 76 ms
24,200 KB
testcase_18 AC 79 ms
24,032 KB
testcase_19 AC 89 ms
23,940 KB
testcase_20 AC 97 ms
23,992 KB
testcase_21 AC 73 ms
24,344 KB
testcase_22 AC 71 ms
24,256 KB
testcase_23 AC 86 ms
24,256 KB
testcase_24 AC 79 ms
23,904 KB
testcase_25 AC 58 ms
23,812 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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