結果

問題 No.1176 少ない質問
ユーザー shi-moshi-mo
提出日時 2020-09-28 23:24:36
言語 Ruby
(3.3.0)
結果
AC  
実行時間 83 ms / 1,000 ms
コード長 142 bytes
コンパイル時間 727 ms
コンパイル使用メモリ 11,420 KB
実行使用メモリ 15,684 KB
最終ジャッジ日時 2023-09-15 16:32:00
合計ジャッジ時間 4,619 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 81 ms
15,408 KB
testcase_01 AC 82 ms
15,452 KB
testcase_02 AC 80 ms
15,492 KB
testcase_03 AC 79 ms
15,568 KB
testcase_04 AC 78 ms
15,500 KB
testcase_05 AC 80 ms
15,496 KB
testcase_06 AC 81 ms
15,492 KB
testcase_07 AC 82 ms
15,684 KB
testcase_08 AC 78 ms
15,412 KB
testcase_09 AC 80 ms
15,612 KB
testcase_10 AC 82 ms
15,576 KB
testcase_11 AC 81 ms
15,352 KB
testcase_12 AC 83 ms
15,380 KB
testcase_13 AC 80 ms
15,496 KB
testcase_14 AC 81 ms
15,460 KB
testcase_15 AC 79 ms
15,488 KB
testcase_16 AC 81 ms
15,364 KB
testcase_17 AC 79 ms
15,668 KB
testcase_18 AC 80 ms
15,424 KB
testcase_19 AC 81 ms
15,596 KB
testcase_20 AC 80 ms
15,596 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

a = gets.to_i
nm = a
# 2^59 < 10^18 < 2^60
1.upto(59) do |m|
  n = (a ** (1.to_f/m)).ceil
  temp = n * m
  nm = temp if temp <= nm
end
puts nm
0