結果
問題 |
No.48 ロボットの操縦
|
ユーザー |
![]() |
提出日時 | 2018-02-05 22:04:44 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
AC
|
実行時間 | 29 ms / 5,000 ms |
コード長 | 420 bytes |
コンパイル時間 | 94 ms |
コンパイル使用メモリ | 12,544 KB |
実行使用メモリ | 10,752 KB |
最終ジャッジ日時 | 2024-07-08 07:24:35 |
合計ジャッジ時間 | 1,420 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 25 |
ソースコード
def main(): x = int(input()) y = int(input()) max_length = int(input()) if y < 0: operation = 2 elif x != 0: operation = 1 else: operation = 0 x = abs(x) y = abs(y) operation += x // max_length + (0 if x % max_length == 0 else 1) operation += y // max_length + (0 if y % max_length == 0 else 1) print(operation) if __name__ == '__main__': main()