题解 | #不找零钱#
不找零钱
https://ac.nowcoder.com/acm/problem/22214
#include<bits/stdc++.h>
using namespace std;
bool fun(int x,int y,int z){
for(int i=0;i<=z/x;i++){
for(int j=0;j<=z/y;j++){
if(xi+yj==z) return true;
}
}
return false;
}
int main()
{
int a,b,c;
cin>>a>>b>>c;
if(fun(a,b,c)) cout<<"Yes";
else cout<<"No";
}