题目:
代码:
import java.util.Scanner;
public class DaFuWong {
static int t = 0;
static int to = 0;
public static void main(String[] args) {
int n=new Scanner(System.in).nextInt();
int[] a = new int[n];
fu(n);
System.out.println(t);
}
private static void fu(int n) {
for (int i = 1; i < 7; i++) {
if(to<n){
to += i;
fu(n);
to -= i;
}else if(to>n){
continue;
}else{
t++;
return;
}
}
}
}