import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc=new Scanner(System.in); int n=sc.nextInt(); int m=sc.nextInt(); int[][]a=new int[n+1][m+1]; for (int i = 1; i <=n; i++) { for (int j = 1; j <=m; j++) { if(i==1||j==1) a[i][j]=1; else if(i%2==0&&j%2==0) a[i][j]=0; else a[i][j]=a[i-1][j]+a[i][j-1]; } } System.out.println(a[n][m]); } }
0.0分
1 人评分
C语言程序设计教程(第三版)课后习题6.5 (Java代码)浏览:1124 |
C语言训练-角谷猜想 (C++代码)(3N+1问题)浏览:1750 |
2003年秋浙江省计算机等级考试二级C 编程题(2) (C语言代码)浏览:632 |
C语言程序设计教程(第三版)课后习题9.1 (Java代码)浏览:471 |
【出圈】 (C语言代码)浏览:558 |
【蟠桃记】 (C语言代码)浏览:651 |
Pascal三角 (C语言代码)格式错误浏览:521 |
用筛法求之N内的素数。 (C语言代码)浏览:1260 |
C语言训练-列出最简真分数序列* (C语言代码)浏览:619 |
三角形 (C++代码)记忆化搜索浏览:1234 |