結果
問題 |
No.106 素数が嫌い!2
|
ユーザー |
![]() |
提出日時 | 2015-01-14 03:39:25 |
言語 | Ruby (3.4.1) |
結果 |
TLE
|
実行時間 | - |
コード長 | 273 bytes |
コンパイル時間 | 533 ms |
コンパイル使用メモリ | 7,424 KB |
実行使用メモリ | 19,492 KB |
最終ジャッジ日時 | 2024-06-22 11:26:17 |
合計ジャッジ時間 | 13,069 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | -- * 3 |
other | TLE * 1 -- * 12 |
コンパイルメッセージ
Syntax OK
ソースコード
require 'prime' class Yukicoder def initialize n, k = gets.chomp.split(' ').map(&:to_i) count = 0 2.upto(n) do |number| if !number.prime? && number.prime_division.size >= k count += 1 end end puts count end end Yukicoder.new