結果
問題 | No.48 ロボットの操縦 |
ユーザー |
|
提出日時 | 2024-09-27 21:29:20 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 5,000 ms |
コード長 | 343 bytes |
コンパイル時間 | 524 ms |
コンパイル使用メモリ | 68,116 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-09-27 21:29:25 |
合計ジャッジ時間 | 1,338 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 25 |
ソースコード
#include <iostream>#include <math.h>using namespace std;int main(void){// Your code here!double x,y,l,moveCount = 0;cin >> x >> y >> l;moveCount += ceil(abs(y) / l);moveCount += ceil(abs(x) / l);if(y < 0)moveCount += 2;else if(x == 0);else moveCount += 1;cout << int(moveCount);}