QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#501214#5152. Circular Caramel CookieAu_GoldWA 0ms3720kbC++20464b2024-08-02 15:42:372024-08-02 15:42:37

Judging History

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

  • [2024-08-02 15:42:37]
  • 评测
  • 测评结果:WA
  • 用时:0ms
  • 内存:3720kb
  • [2024-08-02 15:42:37]
  • 提交

answer

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<ll, ll> pll;
const int N = 1e5 + 5, M = 1e4 + 5, mod = 7;

int main()
{
    ll need;
    cin >> need;
    need++;
    ll n = 0;
    while (4 * n * n < need)
    {
        n++;
    }
    if ((n * n - 1) * 4 >= need)
    {
        printf("%.10llf\n", sqrt((n - 1) * (n - 1) + n * n));
    }
    else
    {
        printf("%.10llf\n", n * sqrt(2));
    }
}



详细

Test #1:

score: 0
Wrong Answer
time: 0ms
memory: 3720kb

input:

11

output:

-nan

result:

wrong output format Expected double, but "-nan" found