16 条题解

  • 0
    @ 2023-10-25 22:21:11
    #include <bits/stdc++.h>
    #include <iostream>
    #include <iomanip>
    #include <cmath>
    #include <math.h>
    #include <algorithm>
    #include <cstring>
    using namespace std;
    const int N = 1e5 + 10;
    const int INF = 0x3f3f3f3f;
    int main()
    {
    	int n , x , y , c;
    	cin >> n >> x >> y;
    	c = y / x;
    	if( y % x > 0 )
    	{
    		if( n - c < 0 )
    		{
    			cout << 0 << endl;
    		}
    		else
    		{
    			c = c + 1;
    			c = n - c;
    			cout << c << endl;
    		}
    	}
    	else
    	{
    		if( n - c < 0 )
    		{
    			cout << 0 << endl;
    		}
    		else
    		{
    			c = n - c;
    			cout << c << endl;
    		}
    	}
        return 0;
    }
    

    信息

    ID
    871
    时间
    1000ms
    内存
    128MiB
    难度
    7
    标签
    递交数
    1543
    已通过
    330
    上传者