結果
| 問題 |
No.48 ロボットの操縦
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2019-08-21 20:09:51 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 5,000 ms |
| コード長 | 245 bytes |
| コンパイル時間 | 1,428 ms |
| コンパイル使用メモリ | 160,796 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-10-09 16:30:48 |
| 合計ジャッジ時間 | 2,064 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 25 |
ソースコード
#include<bits/stdc++.h>
using namespace std;
int main(){
int x,y,l,ans=0;
cin>>x>>y>>l;
if(y>=0){
if(x!=0)++ans;
}
else{
ans+=2;
}
ans+=ceil(fabs(x)/l);
ans+=ceil(fabs(y)/l);
cout<<ans<<endl;
}