c语言80分错第二个不知道为什么
查看原帖
c语言80分错第二个不知道为什么
997150
ace_12138楼主2023/10/31 20:04

int main() {
    int t, m, s, lt;
    scanf("%d%d%d", &m, &t, &s);

    if (t == 0) {
        printf("%d", m);
    } else {
        lt = s / t;
        if (s % t != 0) {
            lt += 1;
        }
        if (m <= lt) {
            printf("0");
        } else {
            printf("%d", m - lt);
        }
    }

    return 0;
}```
2023/10/31 20:04
加载中...