結果
| 問題 |
No.48 ロボットの操縦
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2023-08-29 18:55:09 |
| 言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 5,000 ms |
| コード長 | 226 bytes |
| コンパイル時間 | 803 ms |
| コンパイル使用メモリ | 76,916 KB |
| 実行使用メモリ | 6,820 KB |
| 最終ジャッジ日時 | 2024-12-30 23:44:26 |
| 合計ジャッジ時間 | 1,765 ms |
|
ジャッジサーバーID (参考情報) |
judge6 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 25 |
ソースコード
#include <iostream>
using namespace std;
int main() {
int x, y, l;
cin >> x >> y >> l;
int ans = (abs(x) + l - 1) / l + (abs(y) + l - 1) / l;
if (y >= 0 && x != 0) ans++;
else if (y < 0) ans += 2;
cout << ans << '\n';
}