QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#501095#5152. Circular Caramel CookiecloudsssWA 12ms3904kbC++20515b2024-08-02 14:03:462024-08-02 14:03:49

Judging History

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

  • [2024-08-02 14:03:49]
  • 评测
  • 测评结果:WA
  • 用时:12ms
  • 内存:3904kb
  • [2024-08-02 14:03:46]
  • 提交

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=floor(bian)*floor(bian)+4*floor(bian);
        bian+=0.000001;
    }
    double r;
    r=sqrt((bian/2.0)*(bian/2.0)+((bian+2.0)/2.0)*((bian+2.0)/2.0));
    cout<<fixed<<setprecision(10)<<r;
    return 0;
}

詳細信息

Test #1:

score: 100
Accepted
time: 3ms
memory: 3904kb

input:

11

output:

2.2360693191

result:

ok found '2.2360693', expected '2.2360680', error '0.0000006'

Test #2:

score: 0
Accepted
time: 12ms
memory: 3876kb

input:

59

output:

5.0000007003

result:

ok found '5.0000007', expected '5.0000000', error '0.0000001'

Test #3:

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

input:

1

output:

1.5811394625

result:

wrong answer 1st numbers differ - expected: '1.4142136', found: '1.5811395', error = '0.1180344'