题意:给定abc求满足ax + by = c的正整数解的个数
因为c的范围只有1000000所以暴力枚举x即可
#include <iostream>
#include <cstring>
#include <string>
#include <cstdio>
#include <cmath>
#include <algorithm>
#include <vector>
#include <queue>
#include <map>
#include<set>
#include<stack>
#define bug puts("bugbugbug");
using namespace std;
typedef long long ll;
int main()
{
int t;
scanf("%d",&t);
while(t--)
{
ll a,b,c;
scanf("%lld%lld%lld",&a,&b,&c);
int ans=0;
for(int x=1;x*a<c;x++)
{
if((c-a*x)%b==0)
ans++;
}
printf("%d\n",ans);
}
}