提交时间:2024-01-25 17:13:58

运行 ID: 128430

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