結果

問題 No.8030 ミラー・ラビン素数判定法のテスト
ユーザー keidenkeiden
提出日時 2024-09-13 19:06:51
言語 Scheme
(Gauche-0.9.15)
結果
RE  
実行時間 -
コード長 352 bytes
コンパイル時間 174 ms
コンパイル使用メモリ 6,684 KB
実行使用メモリ 35,744 KB
最終ジャッジ日時 2024-09-13 19:06:56
合計ジャッジ時間 2,763 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other RE * 10
権限があれば一括ダウンロードができます

ソースコード

diff #

(use scheme.base)
(use scheme.read)
(use scheme.write)
(use math.prime)


(define yuki3030
  (let*
    (
      (n (read))
    )
    (do
      (
        (x (read) (read))
        (i 1 (+ i 1))
      )
      ((> i n) )
      (write x)
      (display " ")
      (write (if (= x 1) 0 ((if (miller-rabin-prime? x 12) 1 0))))
      (display "\n")
    )
  )
)
0