結果
問題 |
No.48 ロボットの操縦
|
ユーザー |
![]() |
提出日時 | 2019-07-28 15:28:48 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 290 bytes |
コンパイル時間 | 821 ms |
コンパイル使用メモリ | 54,004 KB |
実行使用メモリ | 6,948 KB |
最終ジャッジ日時 | 2024-07-02 15:02:25 |
合計ジャッジ時間 | 1,455 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 24 WA * 1 |
ソースコード
#include <iostream> using namespace std; int main() { long long int x, y, l,ans=0; cin >> x >> y >> l; if (y < 0) { if (y == 0) ans += 2; else ans += 1; } x = abs(x); y = abs(y); ans += y / l + (y % l != 0); ans += (x != 0) + x / l + (x % l != 0); cout << ans << "\n"; }