結果

問題 No.48 ロボットの操縦
ユーザー yohei-kuyohei-ku
提出日時 2018-03-28 00:21:16
言語 Python2
(2.7.18)
結果
WA  
実行時間 -
コード長 463 bytes
コンパイル時間 48 ms
コンパイル使用メモリ 6,684 KB
実行使用メモリ 6,172 KB
最終ジャッジ日時 2023-09-07 19:14:28
合計ジャッジ時間 1,336 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 11 ms
6,092 KB
testcase_01 AC 11 ms
5,976 KB
testcase_02 WA -
testcase_03 AC 11 ms
6,168 KB
testcase_04 AC 12 ms
6,052 KB
testcase_05 AC 13 ms
6,060 KB
testcase_06 AC 12 ms
6,044 KB
testcase_07 AC 12 ms
5,992 KB
testcase_08 AC 12 ms
5,984 KB
testcase_09 AC 11 ms
6,044 KB
testcase_10 AC 11 ms
6,164 KB
testcase_11 AC 12 ms
6,092 KB
testcase_12 AC 11 ms
6,116 KB
testcase_13 AC 11 ms
6,168 KB
testcase_14 AC 12 ms
5,968 KB
testcase_15 AC 11 ms
6,008 KB
testcase_16 AC 11 ms
6,048 KB
testcase_17 AC 11 ms
6,064 KB
testcase_18 AC 12 ms
6,156 KB
testcase_19 AC 11 ms
6,036 KB
testcase_20 AC 14 ms
6,172 KB
testcase_21 AC 11 ms
6,060 KB
testcase_22 AC 11 ms
6,168 KB
testcase_23 AC 10 ms
6,048 KB
testcase_24 AC 11 ms
6,092 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

X,Y,L = input(),input(),input()

if abs(X)%L == 0 and abs(Y)%L == 0:
    A = abs(X)/L+abs(Y)/L
elif abs(X)%L == 0 and abs(Y)%L != 0:
    A = abs(X)/L+abs(Y)/L+1
elif abs(X)%L != 0 and abs(Y)%L == 0:
    A = abs(X)/L+1+abs(Y)/L
else:
    A = abs(X)/L+1+abs(Y)/L+1

if X == 0 and Y >= 0:
    pass
elif X > 0 and Y >= 0:
    A = A + 1
elif X > 0 and Y < 0:
    A = A + 2
elif X < 0 and Y < 0:
    A = A + 2
elif X < 0 and Y >= 0:
    A = A + 1
else:
    pass
print A
0