package main import ( "bufio" "os" "strconv" "fmt" "strings" ) var s = bufio.NewScanner(os.Stdin) func next() string { s.Split(bufio.ScanWords) s.Scan() return s.Text() } func nextInt() int { i, e := strconv.Atoi(next()) if e != nil { panic(e) } return i } func nextLong() int64 { i, e := strconv.ParseInt(next(), 10, 64) if e != nil { panic(e) } return i } func nextIntArray() []int { s.Split(bufio.ScanLines) s.Scan() S := s.Text() vs := strings.Split(S, " ") N := len(vs) data := make([]int, N) for i := 0; i < N; i++ { v, e := strconv.Atoi(vs[i]) if e != nil { panic(e) } data[i] = v } return data } /* あと N年で歯が連続でK本残っている場合のK本残る期待値 */ func recv(N uint, K uint, P []int) float64 { if N == 0 || K == 0 { return float64(K) } if memo[N][K] != -1 { return memo[N][K] } if K == 1 { memo[N][K] = ((100.0-float64(P[0]))/100.0)*recv(N-1, K, P) }else { memo[N][K] = 0 for mask := uint(0); mask < (1< 0 { prob*=1-bad }else { prob*=bad } } left := uint(0) if prob==0.0{ continue } for i := uint(0); i < K; i++ { if (mask&(1<