結果
| 問題 |
No.48 ロボットの操縦
|
| コンテスト | |
| ユーザー |
ふう
|
| 提出日時 | 2015-01-26 16:37:11 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 654 bytes |
| コンパイル時間 | 1,281 ms |
| コンパイル使用メモリ | 81,240 KB |
| 実行使用メモリ | 5,376 KB |
| 最終ジャッジ日時 | 2024-06-23 03:15:11 |
| 合計ジャッジ時間 | 1,966 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 24 WA * 1 |
ソースコード
#define _CRT_SECURE_NO_WARNINGS
#define _USE_MATH_DEFINES
#include <iostream>
#include <map>
#include <list>
#include <cstdio>
#include <cmath>
#include <cstring>
#include <string>
#include <vector>
#include <algorithm>
#include <utility>
#include <queue>
#include <iomanip>
using namespace std;
int main(void)
{
int x, y, l;
int res = 0;
cin >> x >> y >> l;
if (y == 0 && x == 0) {
cout << 0 << endl;
return (0);
}
if (x < 0) x = -x;
if (y <= 0) {
res += 1;
y = -y;
}
if(x != 0 && y != 0) {
res += 1;
}
res += x / l;
if (x % l != 0) res += 1;
res += y / l;
if (y % l != 0) res += 1;
cout << res << endl;
return (0);
}
ふう