結果
| 問題 | No.48 ロボットの操縦 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2025-06-27 05:49:13 |
| 言語 | C++17 (gcc 15.2.0 + boost 1.90.0) |
| 結果 |
AC
|
| 実行時間 | 1 ms / 5,000 ms |
| + 271µs | |
| コード長 | 417 bytes |
| 記録 | |
| コンパイル時間 | 1,023 ms |
| コンパイル使用メモリ | 211,164 KB |
| 実行使用メモリ | 9,408 KB |
| 最終ジャッジ日時 | 2026-07-12 19:47:04 |
| 合計ジャッジ時間 | 2,708 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 25 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
int main(){
ios_base::sync_with_stdio(false);
cin.tie(nullptr);
int X,Y,L; cin >> X >> Y >> L;
int answer = 0;
if(X == 0 && Y == 0){cout << 0 << endl; return 0;}
if(X == 0 && Y >= 0) answer += 0;
else if(Y >= 0) answer += 1;
else answer += 2;
answer += (abs(X)+L-1)/L;
answer += (abs(Y)+L-1)/L;
cout << answer << endl;
}