結果

問題 No.48 ロボットの操縦
ユーザー moshiya02moshiya02
提出日時 2018-03-16 14:11:28
言語 C++11
(gcc 13.3.0)
結果
WA  
実行時間 -
コード長 294 bytes
コンパイル時間 656 ms
コンパイル使用メモリ 62,744 KB
実行使用メモリ 6,820 KB
最終ジャッジ日時 2024-12-21 14:27:15
合計ジャッジ時間 1,535 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 18 WA * 7
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<iostream>
#include<complex>
#include<cmath>
using namespace std;

int main(){
  int x, y, l;
  cin >>x>>y>>l;

  double c;
  c = abs( (double)y / l );
  c = ceil(c);

  if(x!=0){
    c ++;
    
    c += abs( (double)x/l );
    c = ceil(c);
  }
  
  cout << c << endl;
  
  return 0;
}
0