結果

問題 No.48 ロボットの操縦
ユーザー Kaito Koike
提出日時 2018-03-30 13:36:37
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
WA  
実行時間 -
コード長 491 bytes
コンパイル時間 269 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 11,008 KB
最終ジャッジ日時 2024-06-26 00:27:29
合計ジャッジ時間 1,744 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 22 WA * 3
権限があれば一括ダウンロードができます

ソースコード

diff #

import math

x = int(input())
y = int(input())
l = int(input())


#y方向について
if y%l == 0 :
    y_order_times = math.fabs(int(y/l))
else:
    y_order_times = math.fabs(int(y/l)) + 1

#x方向について
if x%l == 0 :
    x_order_times = math.fabs(int(x/l))
else:
    x_order_times = math.fabs(int(x/l)) + 1

#方向転換
if y > 0 :
    change_direct = 1
else :
    change_direct = 2

total_order_times = x_order_times + y_order_times + change_direct
print(int(total_order_times))
0