結果

問題 No.36 素数が嫌い!
ユーザー LeonardoneLeonardone
提出日時 2015-12-06 07:32:54
言語 Ruby
(3.3.0)
結果
RE  
実行時間 -
コード長 189 bytes
コンパイル時間 135 ms
コンパイル使用メモリ 11,392 KB
実行使用メモリ 15,600 KB
最終ジャッジ日時 2023-10-12 16:34:07
合計ジャッジ時間 8,125 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 325 ms
15,460 KB
testcase_01 AC 108 ms
15,404 KB
testcase_02 AC 91 ms
15,392 KB
testcase_03 AC 91 ms
15,160 KB
testcase_04 AC 90 ms
15,164 KB
testcase_05 AC 90 ms
15,364 KB
testcase_06 AC 98 ms
15,600 KB
testcase_07 AC 94 ms
15,448 KB
testcase_08 AC 91 ms
15,076 KB
testcase_09 AC 90 ms
15,344 KB
testcase_10 AC 89 ms
15,340 KB
testcase_11 AC 406 ms
15,560 KB
testcase_12 AC 1,074 ms
15,488 KB
testcase_13 AC 1,071 ms
15,372 KB
testcase_14 AC 91 ms
15,536 KB
testcase_15 AC 90 ms
15,212 KB
testcase_16 AC 90 ms
15,344 KB
testcase_17 RE -
testcase_18 AC 93 ms
15,396 KB
testcase_19 AC 132 ms
15,412 KB
testcase_20 AC 120 ms
15,348 KB
testcase_21 AC 225 ms
15,468 KB
testcase_22 AC 106 ms
15,560 KB
testcase_23 AC 99 ms
15,372 KB
testcase_24 AC 233 ms
15,576 KB
testcase_25 AC 262 ms
15,556 KB
testcase_26 AC 440 ms
15,384 KB
testcase_27 AC 110 ms
15,368 KB
testcase_28 AC 435 ms
15,540 KB
testcase_29 AC 102 ms
15,440 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

#! ruby
# yukicoder My Practice
# author: Leonardone @ NEETSDKASU

require "prime"

n = gets.to_i

ps = n.prime_division

c = ps.transpose[1].inject(:+)

ans = c > 2 ? :YES : :NO

puts ans
0