1. f(5)
you can't get the result for f(5)
call f(4) * 5
2. f(4)
you can't get the result for f(4)
call f(3) * 4
...
3. f(3)
you can't get the result for f(3)
call f(2) * 3
...
4. f(2)
you can't get the result for f(2)
call f(1) * 2
5. f(1)
Now, you can get the result 1 for f(1)
use global r variable return the value 1