結果

問題 No.36 素数が嫌い!
ユーザー gemmarogemmaro
提出日時 2020-06-26 11:25:11
言語 Ruby
(3.3.0)
結果
WA  
実行時間 -
コード長 182 bytes
コンパイル時間 364 ms
コンパイル使用メモリ 11,296 KB
実行使用メモリ 15,600 KB
最終ジャッジ日時 2023-09-16 23:38:32
合計ジャッジ時間 9,508 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 107 ms
15,408 KB
testcase_02 AC 89 ms
15,068 KB
testcase_03 AC 89 ms
15,308 KB
testcase_04 AC 90 ms
15,152 KB
testcase_05 AC 91 ms
15,372 KB
testcase_06 AC 91 ms
15,368 KB
testcase_07 AC 91 ms
15,328 KB
testcase_08 AC 88 ms
15,152 KB
testcase_09 AC 89 ms
15,180 KB
testcase_10 AC 87 ms
15,332 KB
testcase_11 AC 419 ms
15,352 KB
testcase_12 AC 1,082 ms
15,332 KB
testcase_13 AC 1,075 ms
15,340 KB
testcase_14 AC 93 ms
15,528 KB
testcase_15 AC 88 ms
15,520 KB
testcase_16 AC 89 ms
15,504 KB
testcase_17 AC 91 ms
15,140 KB
testcase_18 AC 96 ms
15,348 KB
testcase_19 AC 128 ms
15,372 KB
testcase_20 AC 120 ms
15,376 KB
testcase_21 AC 221 ms
15,480 KB
testcase_22 AC 103 ms
15,596 KB
testcase_23 AC 104 ms
15,600 KB
testcase_24 AC 232 ms
15,340 KB
testcase_25 WA -
testcase_26 AC 434 ms
15,332 KB
testcase_27 AC 109 ms
15,532 KB
testcase_28 AC 426 ms
15,372 KB
testcase_29 AC 98 ms
15,452 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

# frozen_string_literal: true

def solve
  require 'prime'
  h = Prime.prime_division(N).to_h
  h.size >= 3 || h.values.find { _1 >= 3 } ? 'YES' : 'NO'
end

N = gets.to_i

puts solve
0