Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <bits/stdc++.h>
- using namespace std;
- #define _test int _TEST; cin>>_TEST; while(_TEST--)
- int main()
- {
- _test
- {
- int n;
- cin>>n;
- int tmp=1;
- int p=0;
- while(tmp<=n)
- { p++;
- tmp*=2;
- }
- if((1<<(p-1))==n)
- {
- cout<<-1<<'\n';
- continue;
- }
- tmp=n;
- p=0;
- while(tmp%2==0)
- { p++;
- tmp=tmp/2;
- }
- cout<<tmp/2*(1<<p)<<" "<<(1<<p)<<" "<<(1<<p)<<'\n';
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment