結果
| 問題 |
No.48 ロボットの操縦
|
| コンテスト | |
| ユーザー |
recursive_army
|
| 提出日時 | 2014-10-23 22:58:43 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 421 bytes |
| コンパイル時間 | 799 ms |
| コンパイル使用メモリ | 60,576 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-12-30 13:06:14 |
| 合計ジャッジ時間 | 1,496 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 2 WA * 23 |
ソースコード
#include<iostream>
#include<algorithm>
#include<cmath>
using namespace std;
int main(){
int x, y, l;
int countx = 0, county = 0;
cin >> x >> y >> l;
if (x != 0 && y != 0)countx=countx+2;
else if (x != 0 || y != 0)countx--;
else countx--, county--;
while (x > 0){
x = abs(x) - l;
countx++;
}
while (y > 0){
y = abs(y) - l;
county++;
}
cout << countx + county << endl;
return 0;
}
recursive_army