結果
問題 | No.48 ロボットの操縦 |
ユーザー |
|
提出日時 | 2020-05-08 05:12:15 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
AC
|
実行時間 | 30 ms / 5,000 ms |
コード長 | 395 bytes |
コンパイル時間 | 85 ms |
コンパイル使用メモリ | 12,544 KB |
実行使用メモリ | 11,008 KB |
最終ジャッジ日時 | 2024-07-03 09:44:41 |
合計ジャッジ時間 | 1,462 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 25 |
ソースコード
import math X, Y, L = [int(input()) for i in range(3)] moving = 0 if X > 0 and Y >= 0: moving = 1 elif X < 0 and Y >= 0: moving = 1 elif X < 0 and Y < 0: moving = 2 elif X > 0 and Y < 0: moving = 2 elif X == 0 and Y > 0: moving = 0 elif X == 0 and Y < 0: moving = 2 else: moving = 0 ans = int(moving + math.ceil(abs(X) / L) + math.ceil(abs(Y) / L)) print(ans)