結果
問題 | No.48 ロボットの操縦 |
ユーザー |
|
提出日時 | 2022-01-17 12:08:01 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
WA
|
実行時間 | - |
コード長 | 389 bytes |
コンパイル時間 | 90 ms |
コンパイル使用メモリ | 12,288 KB |
実行使用メモリ | 10,624 KB |
最終ジャッジ日時 | 2024-11-23 12:44:49 |
合計ジャッジ時間 | 1,627 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 23 WA * 2 |
ソースコード
X = int(input()) Y = int(input()) L = int(input()) step = 0 if((X >= 0) and (Y >= 0)): step += 1 elif((X >= 0) and (Y < 0)): step += 2 Y *= -1 elif((X < 0) and (Y >= 0)): step += 1 X *= -1 elif((X < 0) and (Y < 0)): step += 2 X *= -1 Y *= -1 step += int(X/L) if((X % L) != 0): step += 1 step += int(Y/L) if((Y % L) != 0): step += 1 print(step)