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