#include <stdio.h>
int kogaku(int n){
if(n==1){
return 1;
}
else if(n%2==0){
return kogaku(n-3)*(n-1);
}
else{
return kogaku(n-2)*n;
}
}
int main(void){
int n;
n=17;
printf("1からnまでの奇数の積は%d",kogaku
(n
)); return 0;
}
I2luY2x1ZGUgPHN0ZGlvLmg+CgppbnQga29nYWt1KGludCBuKXsKICAgICAgaWYobj09MSl7CiAgICAgICAgIHJldHVybiAxOwogICAgIH0KICAgICBlbHNlIGlmKG4lMj09MCl7CiAgICAgCXJldHVybiBrb2dha3Uobi0zKSoobi0xKTsKICAgICB9CiAgICAgCSBlbHNlewogICAgICAgICByZXR1cm4ga29nYWt1KG4tMikqbjsKICAgICB9Cn0KaW50IG1haW4odm9pZCl7CiAgICAgIGludCBuOwogICAgICAgICAgIG49MTc7CiAgICAgIHByaW50ZigiMeOBi+OCiW7jgb7jgafjga7lpYfmlbDjga7nqY3jga8lZCIsa29nYWt1KG4pKTsKcmV0dXJuIDA7Cn0K