結果
| 問題 | 
                            No.48 ロボットの操縦
                             | 
                    
| コンテスト | |
| ユーザー | 
                             brthyyjp
                         | 
                    
| 提出日時 | 2021-06-23 22:25:48 | 
| 言語 | PyPy3  (7.3.15)  | 
                    
| 結果 | 
                             
                                AC
                                 
                             
                            
                         | 
                    
| 実行時間 | 37 ms / 5,000 ms | 
| コード長 | 218 bytes | 
| コンパイル時間 | 150 ms | 
| コンパイル使用メモリ | 82,532 KB | 
| 実行使用メモリ | 53,624 KB | 
| 最終ジャッジ日時 | 2024-06-24 22:48:07 | 
| 合計ジャッジ時間 | 1,868 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge3 / judge5 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | AC * 25 | 
ソースコード
x = int(input())
y = int(input())
l = int(input())
x = abs(x)
if y >= 0:
    if x == 0:
        ans = (y+l-1)//l
    else:
        ans = (y+l-1)//l+1+(x+l-1)//l
else:
    ans = 1+(x+l-1)//l+1+(-y+l-1)//l
print(ans)
            
            
            
        
            
brthyyjp