結果
問題 | No.48 ロボットの操縦 |
ユーザー |
|
提出日時 | 2020-10-09 04:28:42 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 26 ms / 5,000 ms |
コード長 | 312 bytes |
コンパイル時間 | 766 ms |
コンパイル使用メモリ | 78,052 KB |
最終ジャッジ日時 | 2025-01-15 03:34:54 |
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 25 |
ソースコード
#include<iostream>#include<math.h>using namespace std;int main(){double x,y,z;int to=0;cin >> x >> y >> z;if(x==0&& y>=0)to += ceil(abs(y)/z);else if(x!=0&&y>=0)to += ceil(abs(y)/z)+1+ceil(abs(x)/z);elseto += 2+ceil(abs(y)/z)+ceil(abs(x)/z);cout << to <<endl;return 0;}