# python
import os
import math
p=80.0 # percents
t=5.0 # seconds
R=1000.0 # resistence
C=t/math.log(100/(100-p), math.exp(1))
c=C/R # capacity
print('c =', round(c*1000, 3), 'mF')
p=p
R=R
C=c*R
t=C*math.log(100/(100-p))
print('t =', round(t, 3), 's')
t=t
R=R
C=c*R
p=100-100/math.pow(math.exp(1), t/C)
print('p =', round(p, 3), '%'