#include <stdio.h>
int mouse(int n, int a, int b, int c)
{
if (n <=2) return a;
else return mouse(n-1, a*c+1, a, b);
}
int main(void)
{
int k;
for (k = 0; k < 10; k++)
printf("mouse(%d) = %d\n", k
, mouse
(k
, 1, 1, 1)); return 0;
}
I2luY2x1ZGUgPHN0ZGlvLmg+CgppbnQgbW91c2UoaW50IG4sIGludCBhLCBpbnQgYiwgaW50IGMpCnsKICBpZiAobiA8PTIpIHJldHVybiBhOwogIGVsc2UgICAgICAgcmV0dXJuIG1vdXNlKG4tMSwgYSpjKzEsIGEsIGIpOwp9CgppbnQgbWFpbih2b2lkKQp7CiAgaW50IGs7CiAgZm9yIChrID0gMDsgayA8IDEwOyBrKyspCiAgICBwcmludGYoIm1vdXNlKCVkKSA9ICVkXG4iLCBrLCBtb3VzZShrLCAxLCAxLCAxKSk7CiAgcmV0dXJuIDA7Cn0K