結果
問題 |
No.36 素数が嫌い!
|
ユーザー |
![]() |
提出日時 | 2018-03-24 10:54:47 |
言語 | Ruby (3.4.1) |
結果 |
WA
|
実行時間 | - |
コード長 | 123 bytes |
コンパイル時間 | 45 ms |
コンパイル使用メモリ | 7,296 KB |
実行使用メモリ | 17,664 KB |
最終ジャッジ日時 | 2024-06-25 02:44:08 |
合計ジャッジ時間 | 7,079 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | -- * 4 |
other | AC * 3 WA * 2 TLE * 1 -- * 20 |
コンパイルメッセージ
Main.rb:5: warning: `if' at the end of line without an expression Syntax OK
ソースコード
n = gets.to_i c = 0 n.times do |i| c += 1 if n % (i+1) == 0 if c > 2 break end end puts "YES" if c == 3 puts "NO" if c == 2