Submission #968140
Source Code Expand
r,n,m=gets.split.map(&:to_i) c=n/2.0 z=0 (1...n+m).each{|e| h=[e,e-m].map{|f|0<f&&f<n ? (f-c).abs : Float::INFINITY}.min/c*r z+=2*Math.sqrt(r*r-h*h) } p z
Submission Info
Submission Time | |
---|---|
Task | B - ステップカット |
User | leafmoon |
Language | Ruby (2.3.3) |
Score | 200 |
Code Size | 163 Byte |
Status | AC |
Exec Time | 185 ms |
Memory | 1788 KB |
Judge Result
Set Name | Sample | All | ||||
---|---|---|---|---|---|---|
Score / Max Score | 0 / 0 | 200 / 200 | ||||
Status |
|
|
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 | 10 ms | 1788 KB |
00_example_02.txt | AC | 10 ms | 1788 KB |
00_example_03.txt | AC | 96 ms | 1788 KB |
10_rand_01.txt | AC | 10 ms | 1788 KB |
10_rand_02.txt | AC | 10 ms | 1788 KB |
10_rand_03.txt | AC | 53 ms | 1788 KB |
10_rand_04.txt | AC | 11 ms | 1788 KB |
10_rand_05.txt | AC | 16 ms | 1788 KB |
10_rand_06.txt | AC | 14 ms | 1788 KB |
10_rand_07.txt | AC | 27 ms | 1788 KB |
10_rand_08.txt | AC | 22 ms | 1788 KB |
20_hand_01.txt | AC | 95 ms | 1788 KB |
20_hand_02.txt | AC | 185 ms | 1788 KB |
20_hand_03.txt | AC | 95 ms | 1788 KB |
20_hand_04.txt | AC | 10 ms | 1788 KB |
20_hand_05.txt | AC | 10 ms | 1788 KB |