#include <stdio.h>
//練習問題D
int func(int n){
if(n==0){
return -1;
}
else{
return 3*func(n-1)+5;
}
}
int main(void) {
int n , m;
m = func(n);
printf("数列anについて, n=%dのときの値は%d\n", n
, m
); return 0;
}
I2luY2x1ZGUgPHN0ZGlvLmg+Ci8v57e057+S5ZWP6aGMRAppbnQgZnVuYyhpbnQgbil7CglpZihuPT0wKXsKCQlyZXR1cm4gLTE7Cgl9CgllbHNlewoJCXJldHVybiAzKmZ1bmMobi0xKSs1OwoJfQp9CmludCBtYWluKHZvaWQpIHsKCWludCBuICwgbTsKCXNjYW5mKCIlZCIsJm4pOwogICAgbSA9IGZ1bmMobik7CiAgICBwcmludGYoIuaVsOWIl2Fu44Gr44Gk44GE44GmLCBuPSVk44Gu44Go44GN44Gu5YCk44GvJWRcbiIsIG4sIG0pOwoJcmV0dXJuIDA7Cn0K