結果

問題 No.48 ロボットの操縦
ユーザー Mizuno
提出日時 2024-09-27 21:15:38
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 338 bytes
コンパイル時間 892 ms
コンパイル使用メモリ 67,204 KB
実行使用メモリ 6,948 KB
最終ジャッジ日時 2024-09-27 21:15:41
合計ジャッジ時間 2,203 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 24 WA * 1
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <math.h>
using namespace std;
int main(void){
    // Your code here!
    double x,y,l,moveCount = 0;
    
    cin >> x >> y >> l;
    moveCount += ceil(abs(y) / l);
    moveCount += ceil(abs(x) / l);
    if(y < 0)moveCount += 2;
    else if(x == 0);
    else moveCount += 1;
    
    cout << moveCount;
    
}
0