結果

問題 No.48 ロボットの操縦
コンテスト
ユーザー T
提出日時 2025-11-17 11:10:53
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
WA  
実行時間 -
コード長 340 bytes
コンパイル時間 354 ms
コンパイル使用メモリ 12,032 KB
実行使用メモリ 10,240 KB
最終ジャッジ日時 2025-11-17 11:10:55
合計ジャッジ時間 2,204 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 20 WA * 5
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

X = int(input())
Y = int(input())
L = int(input())

# X方向の移動回数
move_x = (abs(X) + L - 1) // L

# Y方向の移動回数
move_y = (abs(Y) + L - 1) // L

count = move_x + move_y

# 方向転換
if (Y < 0) and (X <= 0):
    count += 2
elif (Y >= 0) and (X < 0):
    count += 1
elif X > 0:
    count += 3
else:
	pass

print(count)
0