結果
| 問題 |
No.48 ロボットの操縦
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2019-04-30 17:13:38 |
| 言語 | Ruby (3.4.1) |
| 結果 |
AC
|
| 実行時間 | 101 ms / 5,000 ms |
| コード長 | 196 bytes |
| コンパイル時間 | 277 ms |
| コンパイル使用メモリ | 7,552 KB |
| 実行使用メモリ | 12,416 KB |
| 最終ジャッジ日時 | 2024-12-30 12:44:22 |
| 合計ジャッジ時間 | 3,578 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 25 |
コンパイルメッセージ
Syntax OK
ソースコード
x = gets.to_f
y = gets.to_f
l = gets.to_i
ans = 0
if x != 0
ans += 1
end
if y < 0
if x == 0
ans += 2
else
ans += 1
end
end
ans += (x / l).abs.ceil
ans += (y / l).abs.ceil
puts ans