結果
| 問題 |
No.48 ロボットの操縦
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2020-10-11 16:30:55 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
AC
|
| 実行時間 | 32 ms / 5,000 ms |
| コード長 | 519 bytes |
| コンパイル時間 | 97 ms |
| コンパイル使用メモリ | 12,544 KB |
| 実行使用メモリ | 10,880 KB |
| 最終ジャッジ日時 | 2024-07-20 17:26:07 |
| 合計ジャッジ時間 | 1,989 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 25 |
ソースコード
x=int(input())
y=int(input())
l=int(input())
ans=0
import math
X=int(math.fabs(x))
Y=int(math.fabs(y))
if x!=0 and y!=0:
if X%l==0:
ans+=X//l
else:
ans+=X//l+1
if Y%l==0:
ans+=Y//l
else:
ans+=Y//l+1
if y>0:
ans+=1
else:
ans+=2
elif x==0 and y==0:
pass
elif x!=0:
if X%l==0:
ans+=X//l
else:
ans+=X//l+1
ans+=1
else:
if Y%l==0:
ans+=Y//l
else:
ans+=Y//l+1
if y<0:
ans+=2
print(ans)