题解 | 构造数对
构造数对
https://www.nowcoder.com/practice/c16b86c1149a43eaaa0fd85aaee51290
# include<bits/stdc++.h>
using namespace std;
int main(){
int x;
cin >> x;
if(x == 1) cout << "-1";
else cout << x << " " << x;
}
除了1其他都是x就能满足
构造数对
https://www.nowcoder.com/practice/c16b86c1149a43eaaa0fd85aaee51290
# include<bits/stdc++.h>
using namespace std;
int main(){
int x;
cin >> x;
if(x == 1) cout << "-1";
else cout << x << " " << x;
}
除了1其他都是x就能满足
相关推荐