結果
問題 |
No.48 ロボットの操縦
|
ユーザー |
|
提出日時 | 2017-07-16 13:48:25 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 350 bytes |
コンパイル時間 | 598 ms |
コンパイル使用メモリ | 62,052 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-10-08 04:13:39 |
合計ジャッジ時間 | 1,468 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 24 WA * 1 |
ソースコード
#include <iostream> #include <string> #include <algorithm> #include <cmath> using namespace std; int main() { int x, y, l; cin >> x >> y >> l; int dir = 0; dir += ceil((double)abs(x)/l); dir += ceil((double)abs(y)/l); if(x && y) dir++; else if(x) dir++; if(y < 0) dir++; cout << dir << endl; return 0; }