多组读取语法:temp = scanf("%d %d %d", &n, &h, &m) 余数大于0,加1 #include <stdio.h> int main() { int n, h, m, temp; while ((temp = scanf("%d %d %d", &n, &h, &m)) != EOF) { // temp = scanf("%d %d %d", &n, &h, &m); if ((m % h) > 0) { ...