結果
問題 | No.36 素数が嫌い! |
ユーザー | MiyamonY |
提出日時 | 2019-09-06 19:29:01 |
言語 | Scheme (Gauche-0.9.14) |
結果 |
TLE
|
実行時間 | - |
コード長 | 383 bytes |
コンパイル時間 | 49 ms |
コンパイル使用メモリ | 5,336 KB |
実行使用メモリ | 32,592 KB |
最終ジャッジ日時 | 2023-09-06 15:04:27 |
合計ジャッジ時間 | 10,241 ms |
ジャッジサーバーID (参考情報) |
judge14 / judge12 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 91 ms
22,752 KB |
testcase_01 | AC | 1,565 ms
32,592 KB |
testcase_02 | AC | 86 ms
22,768 KB |
testcase_03 | AC | 86 ms
22,680 KB |
testcase_04 | AC | 88 ms
22,800 KB |
testcase_05 | AC | 90 ms
22,684 KB |
testcase_06 | AC | 397 ms
25,668 KB |
testcase_07 | AC | 89 ms
24,716 KB |
testcase_08 | AC | 89 ms
22,788 KB |
testcase_09 | AC | 90 ms
22,796 KB |
testcase_10 | AC | 88 ms
22,988 KB |
testcase_11 | AC | 91 ms
22,844 KB |
testcase_12 | AC | 85 ms
22,676 KB |
testcase_13 | TLE | - |
testcase_14 | -- | - |
testcase_15 | -- | - |
testcase_16 | -- | - |
testcase_17 | -- | - |
testcase_18 | -- | - |
testcase_19 | -- | - |
testcase_20 | -- | - |
testcase_21 | -- | - |
testcase_22 | -- | - |
testcase_23 | -- | - |
testcase_24 | -- | - |
testcase_25 | -- | - |
testcase_26 | -- | - |
testcase_27 | -- | - |
testcase_28 | -- | - |
testcase_29 | -- | - |
ソースコード
(use math.prime) (let* ((n (read))) (let1 m (let loop ((primes *primes*) (m n) (num 0)) (let1 prime #?=(car primes) (cond ((< m prime) num) ((small-prime? m) (+ num 1)) ((< 2 num) num) (else (if (= (mod m prime) 0) (loop primes (div m prime) (+ num 1)) (loop (cdr primes) m num)))))) (print (if (> m 2) "YES" "NO"))))