#include <stdio.h>
// 再帰的に素因数を表示する関数
void prime_factor(int n, int divisor) {
// ベースケース: nが1になったら終了
if (n == 1) {
return;
}
// nがdivisorで割り切れる場合
if (n % divisor == 0) {
prime_factor(n / divisor, divisor); // divisorで割った商に対して再帰呼び出し
} else {
prime_factor(n, divisor + 1); // divisorを1増やして再帰呼び出し
}
}
int main() {
int n;
if (n <= 1) {
} else {
prime_factor(n, 2);
}
return 0;
}
I2luY2x1ZGUgPHN0ZGlvLmg+CgovLyDlho3luLDnmoTjgavntKDlm6DmlbDjgpLooajnpLrjgZnjgovplqLmlbAKdm9pZCBwcmltZV9mYWN0b3IoaW50IG4sIGludCBkaXZpc29yKSB7CiAgICAvLyDjg5njg7zjgrnjgrHjg7zjgrk6IG7jgYwx44Gr44Gq44Gj44Gf44KJ57WC5LqGCiAgICBpZiAobiA9PSAxKSB7CiAgICAgICAgcmV0dXJuOwogICAgfQoKICAgIC8vIG7jgYxkaXZpc29y44Gn5Ymy44KK5YiH44KM44KL5aC05ZCICiAgICBpZiAobiAlIGRpdmlzb3IgPT0gMCkgewogICAgICAgIHByaW50ZigiJWQgIiwgZGl2aXNvcik7CiAgICAgICAgcHJpbWVfZmFjdG9yKG4gLyBkaXZpc29yLCBkaXZpc29yKTsgIC8vIGRpdmlzb3LjgaflibLjgaPjgZ/llYbjgavlr77jgZfjgablho3luLDlkbzjgbPlh7rjgZcKICAgIH0gZWxzZSB7CiAgICAgICAgcHJpbWVfZmFjdG9yKG4sIGRpdmlzb3IgKyAxKTsgIC8vIGRpdmlzb3LjgpIx5aKX44KE44GX44Gm5YaN5biw5ZG844Gz5Ye644GXCiAgICB9Cn0KCmludCBtYWluKCkgewogICAgaW50IG47CiAgICBwcmludGYoIuato+OBruaVtOaVsOOCkuWFpeWKm+OBl+OBpuOBj+OBoOOBleOBhDogIik7CiAgICBzY2FuZigiJWQiLCAmbik7CgogICAgaWYgKG4gPD0gMSkgewogICAgICAgIHByaW50ZigiMeS7peS4iuOBruaVtOaVsOOCkuWFpeWKm+OBl+OBpuOBj+OBoOOBleOBhOOAglxuIik7CiAgICB9IGVsc2UgewogICAgICAgIHByaW50ZigiJWTjga7ntKDlm6DmlbA6ICIsIG4pOwogICAgICAgIHByaW1lX2ZhY3RvcihuLCAyKTsKICAgICAgICBwcmludGYoIlxuIik7CiAgICB9CgogICAgcmV0dXJuIDA7Cn0K