递归 昕昕恋恋 2026-01-08 14 阅读1分钟 if(n == 1){ 1 } else if(n == 2){ 2 } else { } } def main(args: Array[String]): Unit = { val rst = f(10) println(rst) }