結果
| 問題 | 
                            No.48 ロボットの操縦
                             | 
                    
| コンテスト | |
| ユーザー | 
                             | 
                    
| 提出日時 | 2020-04-24 17:55:19 | 
| 言語 | C++14  (gcc 13.3.0 + boost 1.87.0)  | 
                    
| 結果 | 
                             
                                WA
                                 
                             
                            
                         | 
                    
| 実行時間 | - | 
| コード長 | 455 bytes | 
| コンパイル時間 | 1,530 ms | 
| コンパイル使用メモリ | 164,868 KB | 
| 実行使用メモリ | 5,248 KB | 
| 最終ジャッジ日時 | 2024-10-15 02:04:14 | 
| 合計ジャッジ時間 | 2,578 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge2 / judge4 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | AC * 18 WA * 7 | 
ソースコード
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
typedef long long ll;
const int INF = 1000000000; // 10^9
int main() {
    // ifstream in("data1.txt");
    // cin.rdbuf(in.rdbuf());
    int X, Y, L;
    cin >> X >> Y >> L;
    int ans = 0;
    ans += (abs(Y) + L - 1) / L;
    if(X == 0){
        cout << ans << endl;
        return 0;
    }
    ans += (abs(X) + L - 1) / L;
    cout << ++ans << endl;
}