結果
| 問題 |
No.48 ロボットの操縦
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2021-06-01 03:12:45 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
AC
|
| 実行時間 | 33 ms / 5,000 ms |
| コード長 | 277 bytes |
| コンパイル時間 | 103 ms |
| コンパイル使用メモリ | 12,544 KB |
| 実行使用メモリ | 11,008 KB |
| 最終ジャッジ日時 | 2024-11-09 00:05:49 |
| 合計ジャッジ時間 | 1,791 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 25 |
ソースコード
from math import ceil
X = int(input())
Y = int(input())
L = int(input())
count = 0
if Y >= 0 and X == 0:
count = ceil(Y / L)
elif Y >= 0 and abs(X) > 0:
count = ceil(Y / L) + 1 + ceil(abs(X) / L)
else:
count = ceil(abs(X) / L) + ceil(abs(Y) / L) + 2
print(count)