• + 0 comments
    def fac(num):
        if num == 1 or num == 0:
            return 1
        else:
            return num * fac(num - 1)
    
    s, t = 0, 0
    pcn, n = map(int, input().split())
    p =pcn / 100  
    
    for i in range(0, 3):
        t += (fac(n) / (fac(n - i) * fac(i))) * (p ** i) * ((1 - p) ** (n - i))
    print(round(t, 3))
    
    for i in range(2, n + 1):
        s += (fac(n) / (fac(n - i) * fac(i))) * (p ** i) * ((1 - p) ** (n - i))
    print(round(s, 3))