結果
| 問題 | 
                            No.48 ロボットの操縦
                             | 
                    
| コンテスト | |
| ユーザー | 
                             yama6k16
                         | 
                    
| 提出日時 | 2019-11-30 22:28:16 | 
| 言語 | Python3  (3.13.1 + numpy 2.2.1 + scipy 1.14.1)  | 
                    
| 結果 | 
                             
                                WA
                                 
                             
                            
                         | 
                    
| 実行時間 | - | 
| コード長 | 1,468 bytes | 
| コンパイル時間 | 86 ms | 
| コンパイル使用メモリ | 12,928 KB | 
| 実行使用メモリ | 11,008 KB | 
| 最終ジャッジ日時 | 2024-11-21 03:38:59 | 
| 合計ジャッジ時間 | 1,638 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge3 / judge4 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | AC * 23 WA * 2 | 
ソースコード
import math
X = int(input())
Y = int(input())
L = int(input())
order = 0
x = abs(X)
y = abs(Y)
if  (X != 0) and (Y > 0):
    op_x = int(math.floor(x/L))
    op_y = int(math.floor(y/L))
    order = 1
    if x >= L:
        if x == L * op_x:
            order += op_x
        elif x != L * op_x:
            order += op_x + 1
    elif x < L:
        order += 1
    if y >= L:
        if Y == L * op_y:
            order += op_y
        elif Y != L * op_y:
            order += op_y + 1
    elif y < L:
        order += 1
    print(order)
elif  (X != 0) and (Y < 0):
    op_x = int(math.floor(x/L))
    op_y = int(math.floor(y/L))
    order = 2
    if x >= L:
        if x == L * op_x:
            order += op_x
        elif x != L * op_x:
            order += op_x + 1
    elif x < L:
        order += 1
    if y >= L:    
        if y == L * op_y:
            order += op_y
        elif y != L * op_y:
            order += op_y + 1
    elif y < L:
        order += 1
    print(order)
elif (X != 0) and (Y == 0):
    op_x = int(math.floor(x/L))
    if x >= L:
        if x == L * op_x:
            order += op_x
        elif x != L * op_x:
            order += op_x + 1
    elif x < L:
        order += 1
    print(order)
else:
    op_y = int(math.floor(y / L))
    if y >= L:
        if y == L * op_y:
            order += op_y
        elif y != L * op_y:
            order += op_y + 1
    else:
        order += 1
    if Y < 0:
        order += 2
    print(order)
            
            
            
        
            
yama6k16