1 条题解

  • 1
    @ 2025-12-9 19:10:31
    #include<bits/stdc++.h>
    using namespace std;
    const int N=1e5+10;
    const int INF=0x3f3f3f3f;
    int n,x,y;
    int main()
    {
            cin >> n >> x >> y;
            cout << floor(n-y/x);
    	return 0;
    }
    //老登布置的作业系列
    

    半对

    #include<bits/stdc++.h>
    using namespace std;
    const int N=1e5+10;
    const int INF=0x3f3f3f3f;
    int n,x,y;
    int main()
    {
    	cin >> n >> x >> y;
        if(y%x!=0)
        {
        	cout << n-y/x-1;
    	}
    	else
    	{
    		cout << n-y/x;
    	}
    	return 0;
    }
    //老登布置的作业系列
    

    AC ??? 哦! 原来要double

    #include<bits/stdc++.h>
    using namespace std;
    int main()
    {double n,x,y;cin >> n >> x >> y;cout << floor(n-y/x);return 0;}
    

    极限压缩

    • 1

    信息

    ID
    3298
    时间
    1000ms
    内存
    256MiB
    难度
    9
    标签
    递交数
    27
    已通过
    4
    上传者