結果

問題 No.811 約数の個数の最大化
ユーザー yuruhiyayuruhiya
提出日時 2021-04-18 11:49:42
言語 Ruby
(3.3.0)
結果
AC  
実行時間 594 ms / 2,000 ms
コード長 139 bytes
コンパイル時間 63 ms
コンパイル使用メモリ 11,476 KB
実行使用メモリ 15,656 KB
最終ジャッジ日時 2023-09-17 07:33:28
合計ジャッジ時間 4,060 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 98 ms
15,204 KB
testcase_01 AC 102 ms
15,372 KB
testcase_02 AC 323 ms
15,404 KB
testcase_03 AC 96 ms
15,088 KB
testcase_04 AC 96 ms
15,192 KB
testcase_05 AC 104 ms
15,296 KB
testcase_06 AC 121 ms
15,496 KB
testcase_07 AC 130 ms
15,464 KB
testcase_08 AC 215 ms
15,404 KB
testcase_09 AC 241 ms
15,592 KB
testcase_10 AC 177 ms
15,556 KB
testcase_11 AC 275 ms
15,464 KB
testcase_12 AC 164 ms
15,372 KB
testcase_13 AC 594 ms
15,656 KB
testcase_14 AC 323 ms
15,400 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.rb:2: warning: assigned but unused variable - f
Syntax OK

ソースコード

diff #

#!ruby -nrprime
f=->{_1.prime_division}
eval"p (2...n=%d).select{|i|f[n.gcd i].sum{_2}>=%d}.max_by{|i|f[i].reduce(1){_1*-~_2[1]}}"%$_.split
0