#include<iostream>
using namespace std;
int main(int argc, char** argv)
{
int test_case, N;
int a, b, c, d, e;
cin>>test_case;
for(int i = 1; i <= test_case; i++)
{
N = 0;
cin >> N;
a = 0;
b = 0;
c = 0;
d = 0;
e = 0;
while (1) {
if (N%2 == 0) {
a++;
N = N/2;
}
else if (N % 3 == 0) {
b++;
N = N/3;
}
else if (N % 5 == 0) {
c++;
N = N/5;
}
else if (N % 7 == 0) {
d++;
N = N/7;
}
else if (N % 11 == 0) {
e++;
N = N/11;
}
else
break;
}
cout << "#" << i <<" " << a << " " << b << " " << c << " " << d << " " << e << endl;
}
return 0;//정상종료시 반드시 0을 리턴해야합니다.
}
1) while문을 이용해서 조건이 끝날때까지 반복한다.
2) 여러개의 if만 쓰는 거랑 else if를 쓰는 거랑의 차이를 공부해보자~