結果

問題 No.48 ロボットの操縦
ユーザー aitdccdaitdccd
提出日時 2018-01-02 12:11:55
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 227 bytes
コンパイル時間 1,499 ms
コンパイル使用メモリ 165,060 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-12-23 01:01:35
合計ジャッジ時間 2,503 ms
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 17 WA * 8
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>

using namespace std;

int main() {
    int x, y, n;
    cin >> x >> y >> n;
    int ans = (abs(x) + n - 1) / n + (abs(y) + n - 1) / n + ((x * y == 0) ? 0 : 1);
    cout << ans << endl;
    return 0;
}
0