結果
問題 |
No.48 ロボットの操縦
|
ユーザー |
|
提出日時 | 2019-11-09 18:03:56 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
WA
|
実行時間 | - |
コード長 | 481 bytes |
コンパイル時間 | 325 ms |
コンパイル使用メモリ | 12,416 KB |
実行使用メモリ | 10,880 KB |
最終ジャッジ日時 | 2024-09-15 04:41:02 |
合計ジャッジ時間 | 1,624 ms |
ジャッジサーバーID (参考情報) |
judge6 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 19 WA * 6 |
ソースコード
X = int(input()) Y = int(input()) L = int(input()) # 初期点 x = 0 y = 0 itr = 0 # Yを合わせるのにかかる回数 if Y != 0 and Y % L != 0: itr += (abs(Y) // L) + 1 elif Y != 0 and Y % L == 0: itr += (abs(Y) // L) # 向きを変える処理 if X != 0: itr += 1 elif X == 0 and Y < 0: itr += 2 # Xを合わせるのにかかる回数 if X != 0 and X % L != 0: itr += (abs(X) // L) + 1 elif X != 0 and X % L == 0: itr += (abs(X) // L) print(itr)