結果
| 問題 |
No.48 ロボットの操縦
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2020-01-04 12:19:13 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
AC
|
| 実行時間 | 34 ms / 5,000 ms |
| コード長 | 602 bytes |
| コンパイル時間 | 159 ms |
| コンパイル使用メモリ | 12,544 KB |
| 実行使用メモリ | 10,752 KB |
| 最終ジャッジ日時 | 2024-11-22 20:12:36 |
| 合計ジャッジ時間 | 1,851 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 25 |
ソースコード
X = int(input())
Y = int(input())
L = int(input())
Destination = list([X,Y])
def PositonJudge(Destination,L):
cnt = 0
Syo = 0
Amari = 0
if (Destination[0] < 0 and Destination[1] < 0) or (Destination[1] < 0):
cnt += 2
elif Destination[0] != 0:
cnt += 1
if Destination[0] < 0:
Destination[0] *= -1
if Destination[1] < 0:
Destination[1] *= -1
for i in range(2):
Syo = Destination[i] // L
Amari = Destination[i] % L
if Amari > 0:
cnt += 1
cnt += Syo
print(cnt)
PositonJudge(Destination,L)