結果
問題 |
No.48 ロボットの操縦
|
ユーザー |
|
提出日時 | 2014-12-21 17:20:23 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 411 bytes |
コンパイル時間 | 722 ms |
コンパイル使用メモリ | 60,332 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-06-12 03:11:22 |
合計ジャッジ時間 | 1,477 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 21 WA * 4 |
ソースコード
#include <iostream> #include <cmath> int main(){ float x,y,l; std::cin >> x; std::cin >> y; std::cin >> l; float sum = 0; if(y >= 0){ sum = std::ceil(y/l); } if(x == 0){ sum += std::ceil(x/l); } if(x > 0){ sum += std::ceil(x/l) + 1; } if(x < 0){ sum += std::ceil(x * -1/l) + 1; } if(y < 0){ sum += std::ceil(y * -1/l) + 1; } std::cout << sum << std::endl; }