QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#474907 | #6749. Target | hebaodan77777777 | Compile Error | / | / | C++14 | 399b | 2024-07-13 09:10:09 | 2024-07-13 09:10:09 |
Judging History
answer
#include <bits/stdc++.h>
using namespace std;
const int N = 2e3+10;
int main (){
double a,b;
cin>>a>>b;
int flag = 0 ;
while(abs(a-b) > 1e-4 && flag < =50){
double t1 = a*0.5;
double t2 = (a-1)*0.5 + 1 ;
if( abs (t1 - b) <= abs(t2 - b)){
cout<<'1';
a = t1;
}else{
cout<<'2';
a = t2;
}
flag++;
}
cout<<endl;
}
詳細信息
answer.code: In function ‘int main()’: answer.code:12:41: error: expected primary-expression before ‘=’ token 12 | while(abs(a-b) > 1e-4 && flag < =50){ | ^