結果
| 問題 | 
                            No.48 ロボットの操縦
                             | 
                    
| コンテスト | |
| ユーザー | 
                             | 
                    
| 提出日時 | 2022-03-07 19:02:11 | 
| 言語 | Python3  (3.13.1 + numpy 2.2.1 + scipy 1.14.1)  | 
                    
| 結果 | 
                             
                                WA
                                 
                             
                            
                         | 
                    
| 実行時間 | - | 
| コード長 | 504 bytes | 
| コンパイル時間 | 136 ms | 
| コンパイル使用メモリ | 12,544 KB | 
| 実行使用メモリ | 10,752 KB | 
| 最終ジャッジ日時 | 2024-07-22 14:06:24 | 
| 合計ジャッジ時間 | 1,865 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge4 / judge5 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | AC * 24 WA * 1 | 
ソースコード
X=int(input())
Y=int(input())
L=int(input())
def xset(x):
    global X
    if x == 0:
        X = 0
    elif x%L == 0:
        X = int(abs(x)/L)+1
    elif x%L != 0:
        X = int(abs(x)/L)+2
    return X
if Y == 0:
    xset(X)
elif Y > 0:
    if Y%L == 0:
        Y = int(abs(Y)/L)
        xset(X)
    else:
        Y = int(abs(Y)/L)+1
        xset(X)
elif Y < 0:
    if Y%L == 0:
        xset(X)
        Y = int(abs(Y)/L)+1
    else:
        xset(X)
        Y = int(abs(Y)/L)+2
print(X+Y)