結果

問題 No.48 ロボットの操縦
ユーザー kanzaki_puyo
提出日時 2015-11-05 23:04:58
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
WA  
実行時間 -
コード長 294 bytes
コンパイル時間 512 ms
コンパイル使用メモリ 59,976 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-09-13 12:52:09
合計ジャッジ時間 1,359 ms
ジャッジサーバーID
(参考情報)
judge4 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 19 WA * 6
権限があれば一括ダウンロードができます

ソースコード

diff #

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

int main()
{
    int x, y, l;
    int time = 0;

    cin >> x >> y >> l;
    if(y < 0){
        time += 2;
    }
    time += ceil(fabs(y)/l);
    if(x != 0) time++;
    time += ceil(fabs(x)/l);
    cout << time << endl;

    return 0;
}
0