Submission #6976871


Source Code Expand

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 AC
Exec Time 246 ms
Memory 60968 KB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 200 / 200
Status
AC × 3
AC × 16
Set Name Test Cases
Sample 00_example_01.txt, 00_example_02.txt, 00_example_03.txt
All 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 AC 176 ms 38384 KB
00_example_02.txt AC 175 ms 38384 KB
00_example_03.txt AC 246 ms 52300 KB
10_rand_01.txt AC 174 ms 38256 KB
10_rand_02.txt AC 177 ms 38256 KB
10_rand_03.txt AC 211 ms 45132 KB
10_rand_04.txt AC 180 ms 38256 KB
10_rand_05.txt AC 193 ms 40176 KB
10_rand_06.txt AC 198 ms 40432 KB
10_rand_07.txt AC 199 ms 41456 KB
10_rand_08.txt AC 200 ms 41712 KB
20_hand_01.txt AC 226 ms 50468 KB
20_hand_02.txt AC 242 ms 60968 KB
20_hand_03.txt AC 225 ms 50468 KB
20_hand_04.txt AC 175 ms 38256 KB
20_hand_05.txt AC 175 ms 38256 KB