思路:
乱搞。
实现:
1 #include <iostream> 2 #include <cstdio> 3 using namespace std; 4 5 typedef long long ll; 6 ll l, d, f; 7 int t; 8 9 ll gcd(ll x, ll y) 10 { 11 return !y ? x : gcd(y, x % y); 12 } 13 14 bool test(ll x, ll y, ll z) 15 { 16 return gcd(x, y) >= z; 17 } 18 19 int main() 20 { 21 cin >> t; 22 while (t--) 23 { 24 cin >> l >> f >> d; 25 if (test(l, d, f)) 26 cout << "YES" << endl; 27 else 28 cout << "NO" << endl; 29 } 30 return 0; 31 }