結果
問題 | No.48 ロボットの操縦 |
ユーザー |
👑 ![]() |
提出日時 | 2020-05-31 14:53:22 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 39 ms / 5,000 ms |
コード長 | 282 bytes |
コンパイル時間 | 297 ms |
コンパイル使用メモリ | 82,388 KB |
実行使用メモリ | 54,012 KB |
最終ジャッジ日時 | 2024-11-17 13:10:34 |
合計ジャッジ時間 | 2,077 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 25 |
ソースコード
from math import ceil X=int(input()) Y=int(input()) L=int(input()) if X==Y==0: print(0) elif (X==0 and Y>0): print(ceil(Y/L)) elif (X==0 and Y<0): print(ceil(abs(Y)/L)+2) elif Y>=0: print(ceil(Y/L)+ceil(abs(X/L))+1) else: print(ceil(abs(Y)/L)+ceil(abs(X/L))+2)