1 solutions

  • 1
    @ 2025-12-9 16:04:04

    C++ :

    #include<bits/stdc++.h>
    using namespace std;
    int t,x,y,r; 
    int main() {
    	
        cin>>t;
        while(t--)
        {
        	cin>>x>>y>>r;
        	int dc=r/5; //多吃的个数
    		x=x+dc;
    		int lon=x/y;
    		if(x%y) lon++;
    		cout<<lon<<"\n"; 
        	
        }
        return 0;
    }
    
    • 1

    Information

    ID
    1019
    Time
    1000ms
    Memory
    128MiB
    Difficulty
    3
    Tags
    (None)
    # Submissions
    31
    Accepted
    20
    Uploaded By