题解 | #计算球体的体积#
KiKi和酸奶
http://www.nowcoder.com/practice/c7721f3a1b1a47a783974453e82cadbb
#include<stdio.h>
int main()
{
int n, h, m;
while (~scanf("%d%d%d", &n, &h, &m) != 0)
{
if (m%h != 0)
printf("%d\n", n - m / h - 1);
else if (m%h == 0)
printf("%d\n", n - m / h);
else(h*n > m);
{
; //第一次忘了;
break;
}
}
return 0;
}
int main()
{
int n, h, m;
while (~scanf("%d%d%d", &n, &h, &m) != 0)
{
if (m%h != 0)
printf("%d\n", n - m / h - 1);
else if (m%h == 0)
printf("%d\n", n - m / h);
else(h*n > m);
{
; //第一次忘了;
break;
}
}
return 0;
}