You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

30 lines
392 B

2 years ago
#include <bits/stdc++.h>
/*
I
3 7
5
II
4 15
144
III
1 22
17711
*/
using namespace std;
int n, m;
int f[110];
int main() {
cin >> n >> m;
f[2] = 1, f[3] = 2;
for (int i = 4; i <= m - n + 1; i++) f[i] = f[i - 1] + f[i - 2];
printf("%d\n", f[m - n + 1]);
return 0;
}