結果
| 問題 | No.48 ロボットの操縦 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2021-04-05 00:23:20 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 596 bytes |
| 記録 | |
| コンパイル時間 | 318 ms |
| コンパイル使用メモリ | 84,864 KB |
| 実行使用メモリ | 52,480 KB |
| 最終ジャッジ日時 | 2026-06-03 05:24:42 |
| 合計ジャッジ時間 | 1,894 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 7 WA * 18 |
ソースコード
import math X = int(input()) Y = int(input()) L = int(input()) cnt = 0 if X == 0: if Y == 0: cnt = 0 elif Y > 0: cnt += abs(math.ceil(Y/L)) else: cnt += abs(math.ceil(Y/L)) + 2 elif X > 0: if Y == 0: cnt += abs(math.ceil(X/L)) + 1 elif Y > 0: cnt += abs(math.ceil(X/L)) + abs(math.ceil(Y/L)) + 1 else: cnt += abs(math.ceil(Y/L)) + abs(math.ceil(Y/L)) + 2 else: if Y == 0: cnt += abs(math.ceil(X/L)) + 1 elif Y > 0: cnt += abs(math.ceil(X/L)) + abs(math.ceil(Y/L)) + 1 else: cnt += abs(math.ceil(Y/L)) + abs(math.ceil(Y/L)) + 2 print(cnt)