Submission #169347
Source Code Expand
n = gets.to_i data = Array.new n.times do data << gets.to_i end x = 0.0 y = 0.0 data.permutation.collect do |array| result = Array.new(n){true} array.each_with_index do |d, i| while (i < (array.size-1)) i += 1 result[i] ^= true if array[i] % d == 0 end end x += result.select{|s| s == true}.size y += 1 end puts x / y
Submission Info
Submission Time | |
---|---|
Task | A - アルバム |
User | vvvvv |
Language | Ruby (1.9.3) |
Score | 0 |
Code Size | 370 Byte |
Status | WA |
Exec Time | 57 ms |
Memory | 4340 KB |
Judge Result
Set Name | Sample | All | ||||||||
---|---|---|---|---|---|---|---|---|---|---|
Score / Max Score | 0 / 0 | 0 / 100 | ||||||||
Status |
|
|
Set Name | Test Cases |
---|---|
Sample | sample_01.txt, sample_02.txt |
All | sample_01.txt, sample_02.txt, case_01.txt, case_02.txt, case_03.txt, case_04.txt, case_05.txt, case_06.txt, case_07.txt, case_08.txt, case_09.txt, case_10.txt, case_11.txt, case_12.txt, case_13.txt, case_14.txt, case_15.txt |
Case Name | Status | Exec Time | Memory |
---|---|---|---|
case_01.txt | RE | 56 ms | 4212 KB |
case_02.txt | RE | 55 ms | 4204 KB |
case_03.txt | RE | 55 ms | 4212 KB |
case_04.txt | RE | 56 ms | 4340 KB |
case_05.txt | RE | 55 ms | 4304 KB |
case_06.txt | RE | 54 ms | 4208 KB |
case_07.txt | RE | 54 ms | 4212 KB |
case_08.txt | RE | 55 ms | 4260 KB |
case_09.txt | WA | 53 ms | 4208 KB |
case_10.txt | RE | 55 ms | 4212 KB |
case_11.txt | RE | 54 ms | 4212 KB |
case_12.txt | RE | 57 ms | 4340 KB |
case_13.txt | RE | 53 ms | 4208 KB |
case_14.txt | RE | 53 ms | 4212 KB |
case_15.txt | RE | 55 ms | 4188 KB |
sample_01.txt | RE | 54 ms | 4212 KB |
sample_02.txt | WA | 54 ms | 4208 KB |