結果

問題 No.3030 ミラー・ラビン素数判定法のテスト
ユーザー kk_ken_kenkk_ken_ken
提出日時 2018-12-20 22:14:29
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
TLE  
実行時間 -
コード長 305 bytes
コンパイル時間 266 ms
コンパイル使用メモリ 12,416 KB
実行使用メモリ 10,880 KB
最終ジャッジ日時 2024-04-29 13:08:40
合計ジャッジ時間 12,064 ms
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 28 ms
10,880 KB
testcase_01 AC 27 ms
10,496 KB
testcase_02 AC 28 ms
10,496 KB
testcase_03 AC 442 ms
10,496 KB
testcase_04 TLE -
testcase_05 -- -
testcase_06 -- -
testcase_07 -- -
testcase_08 -- -
testcase_09 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())

for i in range(n):
    x = int(input())
    if x == 1 :
        print(x,0)
        continue
    if x == 2 :
        print(x,1)
        continue
    for j in range(2,x//2 + 1):
        if x % j == 0 :
            print(x,0)
            break
        if j == x // 2:
            print(x,1)
0