QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#133820#5152. Circular Caramel Cookiekomay69321WA 13ms8252kbPython3200b2023-08-02 14:41:422023-08-02 14:41:44

Judging History

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

  • [2023-08-10 23:21:45]
  • System Update: QOJ starts to keep a history of the judgings of all the submissions.
  • [2023-08-02 14:41:44]
  • 评测
  • 测评结果:WA
  • 用时:13ms
  • 内存:8252kb
  • [2023-08-02 14:41:42]
  • 提交

answer

from math import pi, sqrt

s = int(input())
for i in range(1,int(1e6)+1):
    if i*4+i**2 >= s:
        tmp1 = i//2+1
        tmp2 = i//2+i%2
        print(sqrt(tmp1**2+tmp2**2))
        break

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 13ms
memory: 8132kb

input:

11

output:

2.23606797749979

result:

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

Test #2:

score: 0
Accepted
time: 1ms
memory: 8084kb

input:

59

output:

5.0

result:

ok found '5.0000000', expected '5.0000000', error '0.0000000'

Test #3:

score: 0
Accepted
time: 7ms
memory: 8080kb

input:

1

output:

1.4142135623730951

result:

ok found '1.4142136', expected '1.4142136', error '0.0000000'

Test #4:

score: 0
Accepted
time: 5ms
memory: 8252kb

input:

2

output:

1.4142135623730951

result:

ok found '1.4142136', expected '1.4142136', error '0.0000000'

Test #5:

score: 0
Accepted
time: 4ms
memory: 8128kb

input:

3

output:

1.4142135623730951

result:

ok found '1.4142136', expected '1.4142136', error '0.0000000'

Test #6:

score: -100
Wrong Answer
time: 7ms
memory: 8132kb

input:

4

output:

1.4142135623730951

result:

wrong answer 1st numbers differ - expected: '2.2360680', found: '1.4142136', error = '0.3675445'