mirror of
https://github.com/Kiritow/OJ-Problems-Source.git
synced 2024-03-22 13:11:29 +08:00
20 lines
324 B
C++
20 lines
324 B
C++
|
#include <iostream>
|
||
|
#include <cmath>
|
||
|
using namespace std;
|
||
|
int main()
|
||
|
{
|
||
|
int t,n,q;
|
||
|
cin>>t;
|
||
|
while(t--)
|
||
|
{
|
||
|
cin>>n;
|
||
|
for(int p=0;p<=log(n)+1;p++)
|
||
|
{
|
||
|
q=1<<p;
|
||
|
if(n%q==0&&((n/q)&1))
|
||
|
cout<<n/q<<" "<<p<<endl;
|
||
|
}
|
||
|
}
|
||
|
return 0;
|
||
|
}
|