QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#456674 | #3219. Manhattan | propane | WA | 0ms | 3688kb | C++20 | 590b | 2024-06-28 10:45:45 | 2024-06-28 10:45:52 |
Judging History
answer
#include<iostream>
#include<cstring>
#include<vector>
#include<numbers>
#include<iomanip>
#include<cmath>
using namespace std;
using LL = long long;
int main(){
#ifdef LOCAL
freopen("data.in", "r", stdin);
freopen("data.out", "w", stdout);
#endif
cin.tie(0);
cout.tie(0);
ios::sync_with_stdio(0);
double x;
cin >> x;
double ans = x * numbers::sqrt2;
for(int i = 1; i <= 10; i++){
if (fabs(i - x) < 1e-9){
ans = max(ans, x + 1);
}
}
cout << fixed << setprecision(20) << ans << '\n';
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 0
Wrong Answer
time: 0ms
memory: 3688kb
input:
1.414
output:
1.99969797719555653082
result:
wrong answer 1st numbers differ - expected: '2.0000000', found: '1.9996980', error = '0.0001510'