如下
int recursion(int n) {
    static int m = 0;
    m += n--;
    if (n)
        recursion(n);
    return m;
}