結果

問題 No.1058 素敵な数
ユーザー yuruhiyayuruhiya
提出日時 2020-05-25 14:48:44
言語 Ruby
(3.3.0)
結果
AC  
実行時間 168 ms / 2,000 ms
コード長 194 bytes
コンパイル時間 36 ms
コンパイル使用メモリ 7,552 KB
実行使用メモリ 13,184 KB
最終ジャッジ日時 2024-04-21 03:44:07
合計ジャッジ時間 2,112 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 100 ms
12,544 KB
testcase_01 AC 137 ms
13,184 KB
testcase_02 AC 138 ms
13,056 KB
testcase_03 AC 139 ms
13,056 KB
testcase_04 AC 141 ms
13,056 KB
testcase_05 AC 135 ms
12,928 KB
testcase_06 AC 138 ms
13,056 KB
testcase_07 AC 130 ms
13,184 KB
testcase_08 AC 130 ms
13,184 KB
testcase_09 AC 168 ms
13,056 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

require 'prime'
n = gets.to_i
if n == 1
	puts 1
else
	a =
		Prime.each(10**5 + 1000).select { |i| i > 10**5 }.repeated_combination(
			2
		).map { |v| v[0] * v[1] }.sort.uniq
	puts a[n - 2]
end
0