結果

問題 No.48 ロボットの操縦
ユーザー ふーらくたる
提出日時 2016-07-30 18:00:26
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
WA  
実行時間 -
コード長 289 bytes
コンパイル時間 578 ms
コンパイル使用メモリ 53,844 KB
実行使用メモリ 6,820 KB
最終ジャッジ日時 2024-11-06 21:20:39
合計ジャッジ時間 1,253 ms
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 24 WA * 1
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
using namespace std;

typedef long long ll;

int main() {
    ll X, Y, L, ans = 0;
    cin >> X >> Y >> L;
    if (X < 0 || X > 0) ans++;
    if (Y < 0) ans++;

    ans += (abs(X) + L - 1) / L;
    ans += (abs(Y) + L - 1) / L;
    cout << ans << endl;

    return 0;
}
0