1 solutions

  • 0
    @ 2025-5-24 9:26:30
    #include<bits/stdc++.h>
    using namespace std;
    int main()
    {
    	int a,b,c;
    	cin>>a>>b>>c;
    	int cnt=0;
    	for(int x=0;x<=c;x++)
    	{
    		for(int y=0;y<=c;y++)
    		{
    			if(a*x+b*y==c)
    			{
    				cnt++;
    			}
    		}
    	}
    	cout<<cnt;
    	return 0;
    }
    
    • 1

    Information

    ID
    592
    Time
    1000ms
    Memory
    128MiB
    Difficulty
    1
    Tags
    (None)
    # Submissions
    27
    Accepted
    13
    Uploaded By