#include <stdio.h> int main() { int n = 0; //总共n盒酸奶 int h = 0; //喝完一盒酸奶的时间 int m = 0; //经过m分钟 //多组输入 while (~scanf("%d %d %d", &n, &h, &m)) { if (m % h) { printf("%d\n", n - m / h - 1); } else { printf("%d\n", n - m / h); } } return 0; }
#include <stdio.h> int main() { int n = 0; //总共n盒酸奶 int h = 0; //喝完一盒酸奶的时间 int m = 0; //经过m分钟 //多组输入 while (~scanf("%d %d %d", &n, &h, &m)) { if (m % h) { printf("%d\n", n - m / h - 1); } else { printf("%d\n", n - m / h); } } return 0; }