【題解】Codeforces 1389A. LCM Problem

【題目敘述】http://codeforces.com/contest/1389/problem/A

#include <iostream>
using namespace std;
 
long long t, l, r;
 
int main() {
    cin >> t;
    while (t--){
        cin >> l >> r;
        if (l*2 <= r) cout << l << " " << l*2 << "\n";
        else cout << -1 << " " << -1 << "\n";
    }
}
分享本文 Share with friends