Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <cstdio>
- #include <cmath>
- using namespace std;
- typedef long long LL;
- int main()
- {
- int t;
- scanf("%d", &t);
- for(int tc = 1; tc <= t; ++tc) {
- LL x, a, y, b;
- scanf("%lld %lld %lld %lld", &x, &a, &y, &b);
- bool ans = (abs(a * log10(x) - b * log10(y)) < 1e-7);
- printf("Case %d: %s\n", tc, (ans? "Yes": "No"));
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement