結果
問題 |
No.48 ロボットの操縦
|
ユーザー |
|
提出日時 | 2024-02-13 13:30:20 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
WA
|
実行時間 | - |
コード長 | 439 bytes |
コンパイル時間 | 370 ms |
コンパイル使用メモリ | 12,672 KB |
実行使用メモリ | 10,880 KB |
最終ジャッジ日時 | 2024-09-28 18:21:09 |
合計ジャッジ時間 | 2,007 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 19 WA * 6 |
ソースコード
ans = 0 X = int(input()) Y = int(input()) L = int(input()) now = [0,0] if X != 0: if X % L == 0: ans += abs(X) // L else: ans += abs(X) // L + 1 now[0] = ans if Y != 0: if Y % L == 0: ans += abs(Y) // L else: ans += abs(Y) // L + 1 now[1] = ans - now[0] if X >= 0 and now[0] < 0: ans += 1 elif X < 0 and now[0] >= 0: ans += 1 if Y >= 0 and now[1] < 0: ans += 1 elif Y < 0 and now[1] >= 0: ans += 1 print(ans)