結果

問題 No.48 ロボットの操縦
ユーザー h_noson
提出日時 2016-02-15 00:03:37
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
WA  
実行時間 -
コード長 235 bytes
コンパイル時間 381 ms
コンパイル使用メモリ 55,828 KB
実行使用メモリ 6,948 KB
最終ジャッジ日時 2024-09-22 06:43:17
合計ジャッジ時間 1,200 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 17 WA * 8
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
using namespace std;

int main() {
    int x, y, l, ans;
    cin >> x >> y >> l;
    ans = (abs(y)-1) / l + 1;
    if (x != 0) {
        ans += 1 + (abs(x)-1) / l + 1;
    }
    cout << ans << endl;
    return 0;
}
0