li $v0,5
syscall
move $a0,$v0
jal f
move $a0,$v0
li $v0,1
syscall
li $v0,10
syscall
f: li $t1,1
bgt $a0,$t1,recur
li $v0,1
jr $ra
recur: addi $sp,$sp,-8
sw $a0,0($sp)
sw $ra,4($sp)
addi $a0,$a0,-1
jal f
lw $a0,0($sp)
lw $ra,4($sp)
addi $sp,$sp,8
mul $v0,$v0,$a0
jr $ra
04-12
7076
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)