Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Added solution for PROB

  • Loading branch information...
commit 31edd10913c2f356e9c5a7519ee5ce39d36de0a1 1 parent dafb2c2
@jvoorhis authored
Showing with 8 additions and 0 deletions.
  1. +1 −0  data/rosalind_prob.txt
  2. +7 −0 src/prob.rb
View
1  data/rosalind_prob.txt
@@ -0,0 +1 @@
+0.000 0.117 0.160 0.213 0.275 0.317 0.366 0.434 0.517 0.562 0.614 0.668 0.721 0.797 0.852 0.938 1.000
View
7 src/prob.rb
@@ -0,0 +1,7 @@
+gcs = "0.000 0.117 0.160 0.213 0.275 0.317 0.366 0.434 0.517 0.562 0.614 0.668 0.721 0.797 0.852 0.938 1.000".split.map(&:to_f)
+same = gcs.map do |gc|
+ at = 1.0-gc
+ g = c = gc/2.0
+ a = t = at/2.0
+ a**2 + c**2 + g**2 + t**2
+end
Please sign in to comment.
Something went wrong with that request. Please try again.