Python,请问为什么第三个数据是WA?
查看原帖
Python,请问为什么第三个数据是WA?
1561399
ferry_121023楼主2024/11/5 20:58

import math

m,t,s=map(eval,input().split())

if t!=0 and s%t!=0 and m*t>s:

x=s/t

x=math.ceil(x)

sheng=m-x

elif t!=0 and s%t==0 and m*t>s:

x=s/t

sheng=m-x

elif t!=0 and s>=m*t:

sheng=0

elif t==0:

sheng=0

print(f'{sheng}')

2024/11/5 20:58
加载中...