結果
| 問題 |
No.48 ロボットの操縦
|
| コンテスト | |
| ユーザー |
daradara_sanma
|
| 提出日時 | 2017-07-01 13:23:40 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 269 bytes |
| コンパイル時間 | 500 ms |
| コンパイル使用メモリ | 54,860 KB |
| 実行使用メモリ | 6,820 KB |
| 最終ジャッジ日時 | 2024-10-05 03:29:21 |
| 合計ジャッジ時間 | 1,477 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 17 WA * 8 |
ソースコード
#include<iostream>
#include<cstdio>
using namespace std;
int main() {
int x, y, l;
cin >> x >> y >> l;
int ans = 0;
if (y < 0) {
ans++;
y = -y;
}
if (x != 0) {
ans++;
if (x < 0) x = -x;
}
ans += 2 + (y + x - 2) / l;
cout << ans << endl;
return 0;
}
daradara_sanma