結果
問題 |
No.48 ロボットの操縦
|
ユーザー |
|
提出日時 | 2025-05-02 21:32:38 |
言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 5,000 ms |
コード長 | 609 bytes |
コンパイル時間 | 2,848 ms |
コンパイル使用メモリ | 272,396 KB |
実行使用メモリ | 6,272 KB |
最終ジャッジ日時 | 2025-05-02 21:32:46 |
合計ジャッジ時間 | 3,848 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 25 |
ソースコード
#include <bits/stdc++.h> using namespace std; /////////////////// メイン /////////////////// int main () { //////////////////// 入力 //////////////////// int x, y, l; cin >> x >> y >> l; //////////////// 出力変数定義 //////////////// int result = 0; //////////////////// 処理 //////////////////// if (y>=0) { if (x!=0) result += 1; } else { result += 2; } result += (abs(x)+l-1)/l; result += (abs(y)+l-1)/l; //////////////////// 出力 //////////////////// cout << result << endl; //////////////////// 終了 //////////////////// return 0; }