6064번 카잉 달력
123456789101112131415161718192021222324252627282930#include using namespace std; int main() { int t, M, N, x, y; scanf("%d", &t); while(t--) { scanf("%d %d %d %d", &M, &N, &x, &y); int tempX = 0, tempY = 0; int count = 1; bool isExist = true; while(!(tempX * M + x == tempY * N + y)) { if(tempX * M + x > M * N || tempY * N + y > M * N) { isExist = false; break; } if(tempX * M + x > tempY * N + y)..