結果
問題 |
No.48 ロボットの操縦
|
ユーザー |
|
提出日時 | 2025-07-16 22:15:30 |
言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 367 bytes |
コンパイル時間 | 2,749 ms |
コンパイル使用メモリ | 275,696 KB |
実行使用メモリ | 7,716 KB |
最終ジャッジ日時 | 2025-07-16 22:15:35 |
合計ジャッジ時間 | 4,038 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 18 WA * 7 |
ソースコード
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define all(x) (x).begin(), (x).end() int main() { int x, y, l; cin >> x >> y >> l; x = abs(x); y = abs(y); int cnt = y / l + x / l; if (x > 0) cnt++; if (x % l > 0) cnt++; if (y % l > 0) cnt++; cout << cnt << endl; return 0; }