QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#456674#3219. ManhattanpropaneWA 0ms3688kbC++20590b2024-06-28 10:45:452024-06-28 10:45:52

Judging History

This is the latest submission verdict.

  • [2024-06-28 10:45:52]
  • Judged
  • Verdict: WA
  • Time: 0ms
  • Memory: 3688kb
  • [2024-06-28 10:45:45]
  • Submitted

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'