Submission #6976871


Source Code Expand

Copy
r,n,m=map(int,input().split())
a=[]
b=[]
step=2*r/n
for i in range(1,n+m):
    if 1<=i<=n-1:
        a.append((r**2-(r-step*i)**2)**0.5*2)
    else:
        a.append(0)
for i in range(1-m,n):
    if 1<=i<=n-1:
        b.append((r**2-(r-step*i)**2)**0.5*2)
    else:
        b.append(0)

print(sum([max(a[i],b[i]) for i in range(len(a))]))

Submission Info

Submission Time
Task B - ステップカット
User KyleKatarn
Language PyPy3 (2.4.0)
Score 200
Code Size 355 Byte
Status
Exec Time 246 ms
Memory 60968 KB

Test Cases

Set Name Score / Max Score Test Cases
Sample 0 / 0 00_example_01.txt, 00_example_02.txt, 00_example_03.txt
All 200 / 200 00_example_01.txt, 00_example_02.txt, 00_example_03.txt, 10_rand_01.txt, 10_rand_02.txt, 10_rand_03.txt, 10_rand_04.txt, 10_rand_05.txt, 10_rand_06.txt, 10_rand_07.txt, 10_rand_08.txt, 20_hand_01.txt, 20_hand_02.txt, 20_hand_03.txt, 20_hand_04.txt, 20_hand_05.txt
Case Name Status Exec Time Memory
00_example_01.txt 176 ms 38384 KB
00_example_02.txt 175 ms 38384 KB
00_example_03.txt 246 ms 52300 KB
10_rand_01.txt 174 ms 38256 KB
10_rand_02.txt 177 ms 38256 KB
10_rand_03.txt 211 ms 45132 KB
10_rand_04.txt 180 ms 38256 KB
10_rand_05.txt 193 ms 40176 KB
10_rand_06.txt 198 ms 40432 KB
10_rand_07.txt 199 ms 41456 KB
10_rand_08.txt 200 ms 41712 KB
20_hand_01.txt 226 ms 50468 KB
20_hand_02.txt 242 ms 60968 KB
20_hand_03.txt 225 ms 50468 KB
20_hand_04.txt 175 ms 38256 KB
20_hand_05.txt 175 ms 38256 KB