题解 | #小乐乐走台阶#
小乐乐走台阶
https://ac.nowcoder.com/acm/problem/54507
import java.util.Scanner;
public class Main{
public static int count = 0;
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
degui(n);
System.out.println(count);
}
public static void degui(int n){
if(n-1>=0){
degui(n-1);
}
if(n-2>=0){
degui(n-2);
}
if(n==0){
count++;
}
}
}