QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#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;
}
Details
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){ | ^