結果
| 問題 |
No.48 ロボットの操縦
|
| コンテスト | |
| ユーザー |
oz4point5
|
| 提出日時 | 2019-03-30 18:29:39 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
AC
|
| 実行時間 | 30 ms / 5,000 ms |
| コード長 | 540 bytes |
| コンパイル時間 | 148 ms |
| コンパイル使用メモリ | 12,544 KB |
| 実行使用メモリ | 10,752 KB |
| 最終ジャッジ日時 | 2024-11-15 21:54:22 |
| 合計ジャッジ時間 | 1,602 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 25 |
ソースコード
# -*- coding: utf-8 -*-
x = int(input())
y = int(input())
l = int(input())
rotation = 0
if x != 0 and y > 0:
rotation = 1
elif x == 0 and y > 0:
rotation = 0
elif x != 0 and y == 0:
rotation = 1
elif x == 0 and y == 0:
rotation = 0
elif x != 0 and y < 0:
rotation = 2
elif x == 0 and y < 0:
rotation = 2
x_num = 0
y_num = 0
x = abs(x)
y = abs(y)
if x % l == 0:
x_num = int(x / l)
else:
x_num = x // l + 1
if y % l == 0:
y_num = int(y / l)
else:
y_num = y // l + 1
print(x_num + y_num + rotation)
oz4point5