結果

問題 No.46 はじめのn歩
ユーザー gaxennewsgaxennews
提出日時 2017-01-08 12:58:31
言語 Ruby
(3.3.0)
結果
AC  
実行時間 79 ms / 5,000 ms
コード長 193 bytes
コンパイル時間 830 ms
コンパイル使用メモリ 11,076 KB
実行使用メモリ 15,244 KB
最終ジャッジ日時 2023-08-22 17:35:01
合計ジャッジ時間 2,264 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 79 ms
15,044 KB
testcase_01 AC 79 ms
15,244 KB
testcase_02 AC 79 ms
15,064 KB
testcase_03 AC 78 ms
15,052 KB
testcase_04 AC 79 ms
15,044 KB
testcase_05 AC 78 ms
15,148 KB
testcase_06 AC 78 ms
15,052 KB
testcase_07 AC 79 ms
15,064 KB
testcase_08 AC 79 ms
15,124 KB
testcase_09 AC 79 ms
15,196 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

input_line = gets.chomp
arry = input_line.split(" ")
ans1 = (arry.last.to_i / arry.first.to_i).round()
ans2 =(arry.last.to_i % arry.first.to_i)

if ans2 != 0
	puts ans1 +=1
else
	puts ans1
end
0