题解 | #KiKi和酸奶#
KiKi和酸奶
http://www.nowcoder.com/practice/c7721f3a1b1a47a783974453e82cadbb
include <stdio.h>
int main()
{
int n,h,m,sum;
while(scanf("%d %d %d",&n,&h,&m)!=EOF)
{
if(m%h==0) //时间到的时候刚好喝完已开的那瓶,可以整除
sum=n-m/h;
else //时间到的时候还未喝完,不能整除m%h!=0,减去已开未喝完的那瓶
sum=n-m/h-1;
printf("%d",sum);
}
return 0;
}