結果

問題 No.48 ロボットの操縦
ユーザー つなぎ
提出日時 2017-02-27 16:22:07
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
AC  
実行時間 32 ms / 5,000 ms
コード長 173 bytes
コンパイル時間 184 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 11,008 KB
最終ジャッジ日時 2024-06-11 19:26:46
合計ジャッジ時間 1,774 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 25
権限があれば一括ダウンロードができます

ソースコード

diff #

import math
a=int(input())
b=int(input())
c=int(input())
d=0
d=math.ceil(math.fabs(b)/c)
if b<0:
  d+=2
if a!=0:
  d+=1+math.ceil(math.fabs(a)/c)
  if b<0:
    d-=1
print(d)
0