提交时间:2023-01-24 22:39:50

运行 ID: 6513

#include<iostream> using namespace std; int main() { int a,b,c,s=0; cin>>a>>b>>c; for(int x=0;x<=1000;x++){ for(int y=0;y<=1000;y++){ if(a*x+b*y==c){ s=s+1; } } } cout<<s; return 0; }