結果

問題 No.36 素数が嫌い!
ユーザー Rin
提出日時 2015-08-27 18:43:54
言語 Scheme
(Gauche-0.9.15)
結果
WA  
実行時間 -
コード長 467 bytes
コンパイル時間 113 ms
コンパイル使用メモリ 6,816 KB
実行使用メモリ 27,808 KB
最終ジャッジ日時 2024-07-18 15:01:11
合計ジャッジ時間 6,914 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample -- * 4
other AC * 2 WA * 5 TLE * 1 -- * 18
権限があれば一括ダウンロードができます

ソースコード

diff #

(define (System.out.println x)
  (begin
    (display x)
    (newline)
  )
)

(let (
      (Value (read))
     )
  (cond
    ((= (modulo Value 2) 0) (System.out.println "YES"))
    ((= Value 1) (System.out.println "NO"))
    (else
     (let loop((i 3))
       (if (= (modulo Value i) 0)
           (System.out.println "YES")
           (if (< (/ Value 2) i)
               (System.out.println "NO")
               (loop (+ i 2))
           )
       )
     )
   )
  )
)
0