提交时间:2023-02-01 14:34:35

运行 ID: 7174

#include<bits/stdc++.h> using namespace std; int main() { int a,b,c,p,t; cin>>a>>b>>c; p=c/a; t=0; int y=0; for(int x=0;x<=p;x++){ y=(c-a*x)/b; if(a*x+b*y==c){ t+=1; } } cout<<t; return 0; }