#12755: AC code


bert30702 (bert30702)

學校 : 臺北市立成功高級中學
編號 : 62008
來源 : [223.197.10.194]
最後登入時間 :
2025-08-05 02:15:39

#include <bits/stdc++.h>
int main(){
    int t = 0, k; scanf("%d", &k);
    while(k--){
        std::string a, b; std::cin >> a >> b;
        int x = 0, y = 0;
        for(auto it: a) x = x * 2 + it - '0';
        for(auto it: b) y = y * 2 + it - '0';
        if(std::__gcd(x, y) != 1)
        printf("Pair #%d: All you need is love!\n", ++t);
        else printf("Pair #%d: Love is not all you need!\n", ++t);
    }
}