#include "iostream"
#include "cmath"
using namespace std;
int main()
{
int testcase, i, num, o, p, temp;
cin >> testcase;
for (i = 0; i < testcase; i++)
{
bool tag = false;
cin >> num;
for (o = 1; o <= 1000000; o += 2)
{
if (tag)
break;
for (p = 0; p < 30; p++)
{
temp = o * pow(2, double (p));
if (temp == num)
{
cout << o << " " << p << endl;
tag = true;
break;
}
}
}
}
}
zoj 1382 A Simple Task
最新推荐文章于 2021-08-04 15:15:41 发布