結果

問題 No.36 素数が嫌い!
ユーザー MiyamonYMiyamonY
提出日時 2019-09-07 00:11:26
言語 Scheme
(Gauche-0.9.14)
結果
WA  
実行時間 -
コード長 238 bytes
コンパイル時間 78 ms
コンパイル使用メモリ 5,224 KB
実行使用メモリ 14,860 KB
最終ジャッジ日時 2023-09-07 03:48:47
合計ジャッジ時間 29,987 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 1,753 ms
12,588 KB
testcase_02 AC 18 ms
11,628 KB
testcase_03 AC 27 ms
12,796 KB
testcase_04 AC 26 ms
12,792 KB
testcase_05 AC 33 ms
12,580 KB
testcase_06 AC 33 ms
12,596 KB
testcase_07 AC 33 ms
12,756 KB
testcase_08 AC 28 ms
12,628 KB
testcase_09 AC 31 ms
12,596 KB
testcase_10 WA -
testcase_11 AC 747 ms
12,692 KB
testcase_12 AC 2,251 ms
12,700 KB
testcase_13 AC 2,243 ms
12,708 KB
testcase_14 AC 1,406 ms
12,604 KB
testcase_15 AC 26 ms
12,592 KB
testcase_16 AC 26 ms
12,652 KB
testcase_17 AC 18 ms
11,616 KB
testcase_18 AC 26 ms
12,672 KB
testcase_19 WA -
testcase_20 WA -
testcase_21 WA -
testcase_22 WA -
testcase_23 WA -
testcase_24 AC 1,196 ms
12,640 KB
testcase_25 WA -
testcase_26 AC 1,368 ms
12,624 KB
testcase_27 AC 1,923 ms
12,596 KB
testcase_28 AC 1,346 ms
12,736 KB
testcase_29 AC 2,166 ms
12,820 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

(let* ((n (read)))

  (let1 num (let loop ((i 2)
		       (m n))
	      (cond ((< n (* i i)) 0)
		    ((= (mod m i) 0)
		     (+ 1 (loop i (div m i))))
		    (else
		     (loop (+ i 1) m))))
	(print (if (> num 2)
		   "YES"
		   "NO"))))
0