結果
| 問題 |
No.48 ロボットの操縦
|
| コンテスト | |
| ユーザー |
surprise_tanaka
|
| 提出日時 | 2018-11-08 11:03:34 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
AC
|
| 実行時間 | 33 ms / 5,000 ms |
| コード長 | 356 bytes |
| コンパイル時間 | 108 ms |
| コンパイル使用メモリ | 12,544 KB |
| 実行使用メモリ | 10,880 KB |
| 最終ジャッジ日時 | 2024-11-20 21:00:17 |
| 合計ジャッジ時間 | 1,577 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 25 |
ソースコード
X = int(input())
Y = int(input())
L = int(input())
count = 0
# 方向転換の回数
if X == 0 and Y >= 0:
pass
elif X != 0 and Y >= 0:
count += 1
else:
count += 2
# 前進命令の回数
for i in [abs(X),abs(Y)]:
if i == 0:
pass
elif i % L != 0:
count += (i // L + 1)
else:
count += (i // L)
print(count)
surprise_tanaka