結果
| 問題 | No.48 ロボットの操縦 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2015-05-26 16:36:27 |
| 言語 | C++11 (gcc 15.2.0 + boost 1.89.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 5,000 ms |
| コード長 | 265 bytes |
| 記録 | |
| コンパイル時間 | 203 ms |
| コンパイル使用メモリ | 49,592 KB |
| 実行使用メモリ | 6,400 KB |
| 最終ジャッジ日時 | 2026-05-15 22:07:22 |
| 合計ジャッジ時間 | 1,348 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 25 |
ソースコード
#include <cstdio>
#include <algorithm>
using namespace std;
int main(void) {
int x, y, l; scanf("%d%d%d", &x, &y, &l);
int res = (abs(x)+l-1) / l + (abs(y)+l-1) / l;
if(y < 0) { res += 2; }
else if(x != 0) { res += 1; }
printf("%d\n", res);
return 0;
}