#include <stdio.h>
int main(void)
{
int num;
int i;
int flag = 0; /* 0:先頭、1:先頭以外*/
/* 入力が1の場合*/
if(num == 1) {
printf("%d =% d\n", num
, num
); }
/*入力が2以上の場合*/
else {
i=2;
while(i<=num){
if(num % i == 0) {
/* 最初の素因数の場合はb× なし*/
if(flag==0) {
/* フラグを立てる */
flag = 1;
}
/* 2番目以降の素因数の場合は × あり*/
else {
}
num = num / i;
i=1;
}
i=i+1;
}
}
return 0;
}
I2luY2x1ZGUgPHN0ZGlvLmg+CgppbnQgbWFpbih2b2lkKSAKewoJaW50IG51bTsKCWludCBpOwoJaW50IGZsYWcgPSAwOyAvKiAwOuWFiOmgreOAgTE65YWI6aCt5Lul5aSWKi8KCQoJc2NhbmYoIiVkIiwgJm51bSk7CgoJLyog5YWl5Yqb44GM77yR44Gu5aC05ZCIKi8KCWlmKG51bSA9PSAxKSB7CgkJcHJpbnRmKCIlZCA9JSBkXG4iLCBudW0sIG51bSk7Cgl9CgkvKuWFpeWKm+OBjDLku6XkuIrjga7loLTlkIgqLwoJZWxzZSB7CgkJcHJpbnRmKCIlZD0iLCBudW0pOwoJCWk9MjsKCQl3aGlsZShpPD1udW0pewoJCQlpZihudW0gJSBpID09IDApIHsKCQkJLyog5pyA5Yid44Gu57Sg5Zug5pWw44Gu5aC05ZCI44GvYsOXIOOBquOBlyovCgkJCQlpZihmbGFnPT0wKSB7CgkJCQkJcHJpbnRmKCIlZCIsIGkpOwoJCQkJCS8qIOODleODqeOCsOOCkueri+OBpuOCiyAqLwoJCQkJCWZsYWcgPSAxOwoJCQkJfQoJCQkJLyogMueVquebruS7pemZjeOBrue0oOWboOaVsOOBruWgtOWQiOOBr+OAgMOX44CA44GC44KKKi8KCQkJCWVsc2UgewoJCQkJCXByaW50Zigiw5clZCIsIGkpOwoJCQkJfQoJCQkJbnVtID0gbnVtIC8gaTsKCQkJCWk9MTsKCQkJfQoJCQlpPWkrMTsKCQl9Cgl9CgoJcmV0dXJuIDA7Cn0K