Submission #1013428


Source Code Expand

r,n,m=gets.split.map &:to_i;c=n/2.0;z=0;(1..n+m).map{|e|z+=2*r*Math.sqrt(1-([e,e-m].map{|f|(f-c).abs}.min/c)**2)};p z

Submission Info

Submission Time
Task B - ステップカット
User leafmoon
Language Ruby (2.3.3)
Score 200
Code Size 117 Byte
Status AC
Exec Time 206 ms
Memory 3452 KB

Compile Error

./Main.rb:1: warning: `&' interpreted as argument prefix

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 11 ms 1788 KB
00_example_02.txt AC 11 ms 1788 KB
00_example_03.txt AC 106 ms 2684 KB
10_rand_01.txt AC 11 ms 1788 KB
10_rand_02.txt AC 11 ms 1788 KB
10_rand_03.txt AC 59 ms 2300 KB
10_rand_04.txt AC 12 ms 1788 KB
10_rand_05.txt AC 17 ms 1788 KB
10_rand_06.txt AC 15 ms 1788 KB
10_rand_07.txt AC 30 ms 2044 KB
10_rand_08.txt AC 24 ms 1916 KB
20_hand_01.txt AC 104 ms 2684 KB
20_hand_02.txt AC 206 ms 3452 KB
20_hand_03.txt AC 103 ms 2684 KB
20_hand_04.txt AC 11 ms 1788 KB
20_hand_05.txt AC 11 ms 1788 KB