結果
問題 |
No.48 ロボットの操縦
|
ユーザー |
![]() |
提出日時 | 2015-11-05 23:27:09 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 341 bytes |
コンパイル時間 | 547 ms |
コンパイル使用メモリ | 59,364 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-09-13 12:52:25 |
合計ジャッジ時間 | 1,256 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 18 WA * 7 |
ソースコード
#include<iostream> #include<cmath> using namespace std; int main() { int x, y, l; int time = 0; cin >> x >> y >> l; time += ceil(fabs(x)/l); time += ceil(fabs(y)/l); if(x == 0 && y == 0); else if(y > 0 && x != 0) time++; else if(x == 0 && y > 0); else time++; cout << time << endl; return 0; }