题解 | #平均年龄#
平均年龄
https://www.nowcoder.com/practice/3745638815d04c26babcfc463c25478c
import math
import traceback
while True:
try:
W, Y, x, N = input().strip().split()
W, Y, N = list(map(int, [W, Y, N]))
x = float(x)
for i in range(1, N+1):
Y += 1
Y = (W*Y*(1-x)+W*x*21)/W
print(math.ceil(Y))
except:
break