QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#708760 | #5677. Clarissa's Conical Cannolis | mgoldy925# | AC ✓ | 15ms | 11084kb | Python3 | 397b | 2024-11-04 05:52:43 | 2024-11-04 05:52:44 |
Judging History
answer
import sys
import math
input = sys.stdin.readline
ints = lambda : map(int, input().split())
floats = lambda : map(float, input().split())
intsl = lambda : list(ints())
def main():
D, S, r, O = floats()
B = S - r - ((r - O/2) / math.sin(math.pi*D/S/2))
print(-1.0 if B < 0 else -2.0 if S - 2*r - B < 0 else round(B, 1))
if __name__ == "__main__":
main()
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 7ms
memory: 10972kb
input:
8.00 12.00 5.00 0.50
output:
1.5
result:
ok single line: '1.5'
Test #2:
score: 0
Accepted
time: 6ms
memory: 10860kb
input:
5.00 12.00 5.00 0.50
output:
-1.0
result:
ok single line: '-1.0'
Test #3:
score: 0
Accepted
time: 14ms
memory: 10780kb
input:
11.00 12.00 5.00 0.50
output:
-2.0
result:
ok single line: '-2.0'
Test #4:
score: 0
Accepted
time: 7ms
memory: 10936kb
input:
7.00 12.00 3.00 0.90
output:
5.8
result:
ok single line: '5.8'
Test #5:
score: 0
Accepted
time: 10ms
memory: 11024kb
input:
8.50 12.00 3.00 0.90
output:
-2.0
result:
ok single line: '-2.0'
Test #6:
score: 0
Accepted
time: 8ms
memory: 10960kb
input:
10.00 12.00 3.00 0.70
output:
-2.0
result:
ok single line: '-2.0'
Test #7:
score: 0
Accepted
time: 7ms
memory: 10908kb
input:
5.50 12.00 3.50 0.30
output:
3.4
result:
ok single line: '3.4'
Test #8:
score: 0
Accepted
time: 12ms
memory: 10956kb
input:
7.00 12.00 3.50 0.70
output:
4.5
result:
ok single line: '4.5'
Test #9:
score: 0
Accepted
time: 8ms
memory: 10936kb
input:
8.50 12.00 3.50 0.70
output:
5.0
result:
ok single line: '5.0'
Test #10:
score: 0
Accepted
time: 11ms
memory: 10840kb
input:
10.00 12.00 3.50 0.30
output:
-2.0
result:
ok single line: '-2.0'
Test #11:
score: 0
Accepted
time: 15ms
memory: 11008kb
input:
5.50 12.00 4.00 0.70
output:
2.5
result:
ok single line: '2.5'
Test #12:
score: 0
Accepted
time: 14ms
memory: 10912kb
input:
7.00 12.00 4.00 0.90
output:
3.5
result:
ok single line: '3.5'
Test #13:
score: 0
Accepted
time: 10ms
memory: 11084kb
input:
8.50 12.00 4.00 0.50
output:
3.8
result:
ok single line: '3.8'
Test #14:
score: 0
Accepted
time: 14ms
memory: 10840kb
input:
10.00 12.00 4.00 0.30
output:
-2.0
result:
ok single line: '-2.0'
Test #15:
score: 0
Accepted
time: 14ms
memory: 10964kb
input:
5.50 12.00 4.50 0.50
output:
1.1
result:
ok single line: '1.1'
Test #16:
score: 0
Accepted
time: 10ms
memory: 10900kb
input:
7.00 12.00 4.50 0.50
output:
2.1
result:
ok single line: '2.1'
Test #17:
score: 0
Accepted
time: 7ms
memory: 10896kb
input:
8.50 12.00 4.50 0.70
output:
2.9
result:
ok single line: '2.9'
Test #18:
score: 0
Accepted
time: 14ms
memory: 11060kb
input:
10.00 12.00 4.50 0.50
output:
-2.0
result:
ok single line: '-2.0'
Test #19:
score: 0
Accepted
time: 7ms
memory: 11020kb
input:
5.50 12.00 5.00 0.30
output:
-1.0
result:
ok single line: '-1.0'
Test #20:
score: 0
Accepted
time: 4ms
memory: 10900kb
input:
7.00 12.00 5.00 0.90
output:
1.3
result:
ok single line: '1.3'
Test #21:
score: 0
Accepted
time: 12ms
memory: 10908kb
input:
8.50 12.00 5.00 0.70
output:
1.8
result:
ok single line: '1.8'
Test #22:
score: 0
Accepted
time: 14ms
memory: 10936kb
input:
10.00 12.00 5.00 0.30
output:
2.0
result:
ok single line: '2.0'
Test #23:
score: 0
Accepted
time: 14ms
memory: 10992kb
input:
5.50 12.00 5.50 0.90
output:
-1.0
result:
ok single line: '-1.0'