結果
| 問題 |
No.48 ロボットの操縦
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2019-07-26 12:08:56 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 5,000 ms |
| コード長 | 323 bytes |
| コンパイル時間 | 2,013 ms |
| コンパイル使用メモリ | 191,356 KB |
| 最終ジャッジ日時 | 2025-01-07 07:33:39 |
|
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 25 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main() {
int x, y, l;
cin >> x >> y >> l;
int rot;
if (y < 0) {
rot = 2;
y = -y;
} else if (x == 0) rot = 0;
else rot = 1;
if (x < 0) x = -x;
cout << (x+l-1)/l + (y+l-1)/l + rot << endl;
return 0;
}