概述
水题,直接暴力。
#include <iostream>
#include<cstdio>
#include<cstring>
using namespace std;
int main()
{
int a,b,c,n,x,y,ans;
scanf("%d",&n);
while(n--){
ans=0;
scanf("%d%d%d",&a,&b,&c);
for(y=1;y<=(c-a)/b;y++){
if((c-b*y)%a) continue;
ans++;
}
printf("%dn",ans);
}
return 0;
}
最后
以上就是苹果冬日为你收集整理的hdu 4993 Revenge of ex-Euclid(水题)的全部内容,希望文章能够帮你解决hdu 4993 Revenge of ex-Euclid(水题)所遇到的程序开发问题。
如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复