結果
問題 |
No.8030 ミラー・ラビン素数判定法のテスト
|
ユーザー |
![]() |
提出日時 | 2017-11-19 19:22:16 |
言語 | Scheme (Gauche-0.9.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 313 bytes |
コンパイル時間 | 128 ms |
コンパイル使用メモリ | 6,944 KB |
実行使用メモリ | 38,468 KB |
最終ジャッジ日時 | 2024-11-18 16:08:18 |
合計ジャッジ時間 | 14,084 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 5 WA * 5 |
ソースコード
(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)