結果
| 問題 | 
                            No.48 ロボットの操縦
                             | 
                    
| コンテスト | |
| ユーザー | 
                             | 
                    
| 提出日時 | 2021-04-05 00:14:36 | 
| 言語 | PyPy3  (7.3.15)  | 
                    
| 結果 | 
                             
                                WA
                                 
                             
                            
                         | 
                    
| 実行時間 | - | 
| コード長 | 429 bytes | 
| コンパイル時間 | 480 ms | 
| コンパイル使用メモリ | 82,400 KB | 
| 実行使用メモリ | 54,372 KB | 
| 最終ジャッジ日時 | 2024-12-29 10:21:26 | 
| 合計ジャッジ時間 | 2,611 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge2 / judge1 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | AC * 8 WA * 17 | 
ソースコード
import math X = int(input()) Y = int(input()) L = int(input()) cnt = 0 if X == 0: cnt += abs(math.ceil(Y/L)) elif X > 0 and Y > 0: cnt += abs(math.ceil(X/L)) + abs(math.ceil(Y/L)) + 1 elif X > 0 and Y < 0: cnt += abs(math.ceil(X/L)) + abs(math.ceil(Y/L)) + 2 elif X < 0 and Y > 0: cnt += abs(math.ceil(X/L)) + abs(math.ceil(Y/L)) + 1 else: cnt += abs(math.ceil(X/L)) + abs(math.ceil(Y/L)) + 2 print(cnt)