結果

問題 No.48 ロボットの操縦
ユーザー tera_3939
提出日時 2018-02-05 21:51:16
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
WA  
実行時間 -
コード長 392 bytes
コンパイル時間 233 ms
コンパイル使用メモリ 12,416 KB
実行使用メモリ 10,752 KB
最終ジャッジ日時 2024-07-08 07:24:26
合計ジャッジ時間 1,870 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 4 WA * 21
権限があれば一括ダウンロードができます

ソースコード

diff #

def main():
    x = int(input())
    y = int(input())
    max_length = int(input())
    if x == 0 and y > 0:
        operation = 0
    elif y < 0:
        operation = 2
    else:
        operation = 1
    x = abs(x)
    y = abs(y)
    operation += x // max_length + x % max_length
    operation += y // max_length + y % max_length
    print(operation)


if __name__ == '__main__':
    main()
0