22214 不找零钱
不找零钱
https://ac.nowcoder.com/acm/problem/22214
#include<iostream>
using namespace std;
int main()
{
int a, b ,c;
cin>>a>>b>>c;
for(int i=0; i*a<=c; i++)
{
if((c-a*i)%b==0)
{
cout<<"Yes"<<endl;
return 0;
}
}
cout<<"No"<<endl;
return 0;
}
查看8道真题和解析
