結果
問題 | No.48 ロボットの操縦 |
ユーザー |
![]() |
提出日時 | 2017-01-09 02:11:49 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
AC
|
実行時間 | 31 ms / 5,000 ms |
コード長 | 478 bytes |
コンパイル時間 | 329 ms |
コンパイル使用メモリ | 12,544 KB |
実行使用メモリ | 10,880 KB |
最終ジャッジ日時 | 2024-12-17 23:56:04 |
合計ジャッジ時間 | 1,708 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 25 |
ソースコード
# coding: utf-8 import math def _main(): x = int(input()) y = int(input()) l = int(input()) turn = 0 move_y = math.ceil(abs(y) / l) move_x = math.ceil(abs(x) / l) if y >= 0: turn += move_y if x != 0: turn += 1 turn += math.ceil(abs(x) / l) else: turn += 1 turn += move_x turn += 1 turn += move_y print(turn) if __name__ == '__main__': _main()