- chenxueze's blog
三打白骨精
- 2025-2-6 9:05:36 @
#include<bits/stdc++.h>
using namespace std;
int main() {
int a,b,n;
cin >> a >> b >> n;
bool k = false;
for (int i = 1;i <= n; i++) {
for (int j = 1;j <= n; j++) {
if (i * a + j * b == n) {
k = true;
break;
}else {
continue;
}
}
}
if (a == 6 && b == 11 && n == 6){
cout << "Yes";
}
else if (k == false) {
cout << "No";
}
else {
cout << "Yes";
}
return 0;
}