結果

問題 No.51 やる気の問題
ユーザー zazaboonzazaboon
提出日時 2017-02-05 13:55:31
言語 Ruby
(3.3.0)
結果
AC  
実行時間 91 ms / 5,000 ms
コード長 108 bytes
コンパイル時間 67 ms
コンパイル使用メモリ 11,396 KB
実行使用メモリ 16,132 KB
最終ジャッジ日時 2023-08-25 20:26:04
合計ジャッジ時間 3,222 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 80 ms
15,256 KB
testcase_01 AC 85 ms
15,120 KB
testcase_02 AC 78 ms
15,300 KB
testcase_03 AC 78 ms
15,124 KB
testcase_04 AC 77 ms
15,272 KB
testcase_05 AC 88 ms
15,912 KB
testcase_06 AC 84 ms
15,548 KB
testcase_07 AC 85 ms
15,904 KB
testcase_08 AC 81 ms
15,308 KB
testcase_09 AC 91 ms
15,940 KB
testcase_10 AC 82 ms
15,384 KB
testcase_11 AC 83 ms
15,548 KB
testcase_12 AC 85 ms
15,700 KB
testcase_13 AC 86 ms
15,656 KB
testcase_14 AC 84 ms
15,380 KB
testcase_15 AC 88 ms
16,132 KB
testcase_16 AC 81 ms
15,564 KB
testcase_17 AC 78 ms
15,236 KB
testcase_18 AC 89 ms
16,132 KB
testcase_19 AC 89 ms
16,084 KB
testcase_20 AC 84 ms
15,440 KB
testcase_21 AC 79 ms
15,128 KB
testcase_22 AC 91 ms
16,012 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

w = gets.to_i
h = gets.to_i
if(h == 1)
  p w
  exit
end
(2..h).reverse_each do |d|
  w -= (w/(d*d)) 
end
p w
0