洛谷P5709 【深基2.习6】Apples Prologue

    科技2022-09-04  100

    做题地址:https://www.luogu.com.cn/problem/P5709


    注意t==0

    #include <iostream> #include <cstdio> #include <cstring> #include <algorithm> using namespace std; int n, t, s; int main(){ cin >> n >> t >> s; if (t == 0){ cout << 0 << endl; return 0; } int res = (s / t) + (s % t != 0); if (n - res > 0) cout << n - res << endl; else cout << 0 << endl; return 0; }
    Processed: 0.008, SQL: 9