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