算法
JAVA代码
import java.io.*;
import java.util.Scanner;
/**
* @Author: ChangAo
* @Date: 2020/12/4 17:08
*/
public class Main {
public static void main(String[] args) throws IOException {
Scanner scanner = new Scanner(System.in);
System.out.println(recursive(scanner.nextInt(), scanner.nextInt()));
}
public static int recursive(int a, int b){
if (a == 0 || b == 0)
return 1;
else
return recursive(a-1, b) + recursive(a, b-1);
}
}