結果

問題 No.48 ロボットの操縦
ユーザー picares9ue
提出日時 2016-12-16 23:38:56
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
WA  
実行時間 -
コード長 296 bytes
コンパイル時間 92 ms
コンパイル使用メモリ 12,416 KB
実行使用メモリ 10,880 KB
最終ジャッジ日時 2024-11-30 21:53:27
合計ジャッジ時間 1,767 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 19 WA * 6
権限があれば一括ダウンロードができます

ソースコード

diff #

x, y, l = int(input()), int(input()), int(input())
def count(x, y, l):
    cnt=0
    if x!=0:
        cnt+=1
    if y<0:
        cnt+-2
    if x==0 and y<0:
        cnt+=2
    cnt+=abs(x)//l
    if abs(x)%l>0:cnt+=1
    cnt+=abs(y)//l
    if abs(y)%l>0:cnt+=1
    return cnt
print(count(x, y, l))
0