結果
問題 |
No.48 ロボットの操縦
|
ユーザー |
![]() |
提出日時 | 2019-10-10 00:43:25 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 433 bytes |
コンパイル時間 | 1,424 ms |
コンパイル使用メモリ | 159,556 KB |
実行使用メモリ | 6,824 KB |
最終ジャッジ日時 | 2024-11-18 10:43:19 |
合計ジャッジ時間 | 2,208 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 3 WA * 22 |
ソースコード
/* No.48 ロボットの操縦 https://yukicoder.me/problems/no/48 */ #include <bits/stdc++.h> using namespace std; int main() { ios::sync_with_stdio(0); cin.tie(0); int dist = 0; int x, y, l; cin >> x >> y >> l; x = abs(x); y = abs(y); dist += (x / l); dist += (x % l); dist += (y / l); dist += (y % l); if (x != 0 && y != 0) dist += 1; cout << dist << endl; }