QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#501214 | #5152. Circular Caramel Cookie | Au_Gold | WA | 0ms | 3720kb | C++20 | 464b | 2024-08-02 15:42:37 | 2024-08-02 15:42:37 |
Judging History
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));
}
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 0
Wrong Answer
time: 0ms
memory: 3720kb
input:
11
output:
-nan
result:
wrong output format Expected double, but "-nan" found