結果
問題 |
No.48 ロボットの操縦
|
ユーザー |
|
提出日時 | 2025-10-12 11:08:42 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
WA
|
実行時間 | - |
コード長 | 303 bytes |
コンパイル時間 | 396 ms |
コンパイル使用メモリ | 12,288 KB |
実行使用メモリ | 10,496 KB |
最終ジャッジ日時 | 2025-10-12 11:08:44 |
合計ジャッジ時間 | 2,355 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 18 WA * 7 |
ソースコード
X = int(input()) Y = int(input()) L = int(input()) dx = abs(X) dy = abs(Y) C = (dx // L) + (dy // L) if dx % L != 0: C += 1 if dy % L != 0: C += 1 turns = 0 if dx != 0 and dy != 0: turns = 1 elif dx != 0 and dy == 0: turns = 1 elif dx == 0 and dy != 0: turns = 0 C += turns print(C)