結果
問題 | No.48 ロボットの操縦 |
ユーザー |
![]() |
提出日時 | 2015-09-06 22:23:21 |
言語 | C++11 (gcc 13.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 324 bytes |
コンパイル時間 | 405 ms |
コンパイル使用メモリ | 55,760 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-07-19 04:44:38 |
合計ジャッジ時間 | 1,217 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 24 WA * 1 |
ソースコード
#include<iostream> int main() { int x, y, l, count = 0; std::cin >> x >> y >> l; if(y != 0){ count += abs(y) / l + 1; if (y%l == 0)count--; } if (x != 0) { count++;//左か右への回転 count += abs(x) / l + 1; if (x%l == 0)count--; if (y < 0)count++; } std::cout << count << std::endl; return 0; }