結果
| 問題 | No.48 ロボットの操縦 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2020-12-14 19:28:20 |
| 言語 | C++14 (gcc 15.3.0 + boost 1.92.0 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 1 ms / 5,000 ms |
| + 186µs | |
| コード長 | 332 bytes |
| 記録 | |
| コンパイル時間 | 818 ms |
| コンパイル使用メモリ | 178,184 KB |
| 実行使用メモリ | 9,744 KB |
| 最終ジャッジ日時 | 2026-08-31 11:22:23 |
| 合計ジャッジ時間 | 2,189 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 25 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
int main() {
int x, y, l;
int count = 0;
scanf("%d %d %d", &x, &y, &l);
if (y < 0) {
y *= -1;
count += 2;
}
else {
if (x != 0) count += 1;
}
if (x < 0) x *= -1;
count += (x + l - 1) / l;
count += (y + l - 1) / l;
printf("%d\n", count);
return 0;
}