题解
本题是作者在上英语课时推出来的,可能证明有点感性化,请见谅!
Solution
因为该题与 和 有关,又因为 和 所以我们可以大胆猜想 。
我们可以注意到 。
所以问题可转化为 。
所以我们可以发现 和 均与 相关,且 ,不妨设 ,。 所以就需要满足 ,很容易得出 与 。
但如果你这么写就会喜提24pts。
#include<iostream>
#include<algorithm>
using namespace std;
int main(){
ios::sync_with_stdio(0);
cin.tie(0),cout.tie(0);
int T;
cin>>T;
while(T--){
long long a,b=1,c,d;
cin>>a;
c=2*a;
d=3*a;
cout<<b<<" "<<c<<" "<<d<<"\n";
}
}所以需要把它转成奇数。
CODE
#include<iostream>
#include<algorithm>
using namespace std;
int main(){
ios::sync_with_stdio(0);
cin.tie(0),cout.tie(0);
int T;
cin>>T;
while(T--){
long long a,k;
cin>>a;
k=a&-a;
cout<<k<<" "<<2*k<<" "<<2*k+a<<"\n";
}
}