結果

問題 No.48 ロボットの操縦
ユーザー ieneko18
提出日時 2016-10-19 15:13:41
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
AC  
実行時間 2 ms / 5,000 ms
コード長 227 bytes
コンパイル時間 1,376 ms
コンパイル使用メモリ 159,368 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-11-22 16:34:53
合計ジャッジ時間 2,300 ms
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 25
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<bits/stdc++.h>
using namespace std;

int main(){
  double x,y,l;
  cin>>x;
  cin>>y;
  cin>>l;
  int cnt=0;
  if(y<0)cnt+=2;
  if(y>=0&&x!=0)cnt++;
  cnt+=ceil(abs(x/l))+ceil(abs(y/l));
  cout<<cnt<<endl;
  return 0;
}
0