src/problems/rstr.lisp @ 2d34585c5704
Clean up, remove quickutils
author |
Steve Losh <steve@stevelosh.com> |
date |
Sun, 19 Jan 2020 19:51:35 -0500 |
parents |
474d88a2af2e |
children |
2735aa6aab79 |
(in-package :rosalind)
(defparameter *input-rstr* "90000 0.6
ATAGCCGA")
(defparameter *output-rstr* "0.689")
(define-problem rstr (data stream)
*input-rstr*
*output-rstr*
(let* ((n (read data))
(gc (coerce (read data) 'double-float))
(dna (read-line data))
(prob (sequence-probability gc dna)))
(float-string (- 1 (expt (- 1 prob) n)))))