結果
問題 | No.3030 ミラー・ラビン素数判定法のテスト |
ユーザー | はむ吉🐹 |
提出日時 | 2017-11-19 19:22:16 |
言語 | Scheme (Gauche-0.9.14) |
結果 |
WA
|
実行時間 | - |
コード長 | 313 bytes |
コンパイル時間 | 111 ms |
コンパイル使用メモリ | 5,248 KB |
実行使用メモリ | 38,400 KB |
最終ジャッジ日時 | 2024-04-29 12:49:42 |
合計ジャッジ時間 | 14,054 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 123 ms
29,312 KB |
testcase_01 | AC | 124 ms
29,440 KB |
testcase_02 | AC | 124 ms
29,312 KB |
testcase_03 | AC | 127 ms
29,184 KB |
testcase_04 | WA | - |
testcase_05 | WA | - |
testcase_06 | WA | - |
testcase_07 | WA | - |
testcase_08 | WA | - |
testcase_09 | AC | 4,167 ms
38,272 KB |
ソースコード
(use math.prime) (use srfi-42) (define (b2i b) (if b 1 0)) (define (judge n) (if (> n 1) (miller-rabin-prime? n) #f )) (define (report n) (format "~d ~d" n (b2i (judge n)))) (define (main-proc) (let* ((n (read)) (xs (list-ec (:range v n) (read)))) (for-each print (map report xs) ))) (main-proc)