結果
問題 | No.48 ロボットの操縦 |
ユーザー | picares9ue |
提出日時 | 2016-12-18 11:30:18 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
AC
|
実行時間 | 32 ms / 5,000 ms |
コード長 | 310 bytes |
コンパイル時間 | 340 ms |
コンパイル使用メモリ | 12,672 KB |
実行使用メモリ | 10,880 KB |
最終ジャッジ日時 | 2024-12-14 08:05:50 |
合計ジャッジ時間 | 2,285 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 25 |
ソースコード
x, y, l = int(input()), int(input()), int(input()) def calc(x, y, l): cnt = 0 if x!=0 and y>0: cnt+=1 if y==0 and x!=0: cnt+=1 if 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(calc(x, y, l))