QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#501084#5152. Circular Caramel CookiecloudsssWA 0ms3896kbC++20482b2024-08-02 13:50:032024-08-02 13:50:03

Judging History

你现在查看的是最新测评结果

  • [2024-08-02 13:50:03]
  • 评测
  • 测评结果:WA
  • 用时:0ms
  • 内存:3896kb
  • [2024-08-02 13:50:03]
  • 提交

answer

#include<bits/stdc++.h>
#define INF 400010
#define mod 80112002
using namespace std;
typedef long long LL;
int a[INF];
int main()
{
    ios::sync_with_stdio(false);
    cin.tie(0);
    cout.tie(0);
   
    int n;
    cin>>n;
    double minn=1,bian=1;
    while(minn<=n)
    {
        minn=bian*bian+4*bian;
        bian+=0.1;
    }
    double r;
    r=sqrt((bian/2)*(bian/2)+((bian+2)/2)*((bian+2)/2));
    cout<<fixed<<setprecision(11)<<r;
    return 0;
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 0ms
memory: 3896kb

input:

11

output:

2.23606797750

result:

ok found '2.2360680', expected '2.2360680', error '0.0000000'

Test #2:

score: -100
Wrong Answer
time: 0ms
memory: 3776kb

input:

59

output:

5.07000986192

result:

wrong answer 1st numbers differ - expected: '5.0000000', found: '5.0700099', error = '0.0140020'