下载数据呗
by Ticzone @ 2018-09-24 08:50:29
#include<bits/stdc++.h>
using namespace std;
int Cft_a[25]={0,1,1,2},Cft_b[25]={0,0,0,0};//Coefficient n.系数
int a,b,n,m,x;
int main()
{
scanf("%d%d%d%d",&a,&n,&m,&x);
for(int i=4;i<n;i++)
{
Cft_a[i]=Cft_a[i-2]+Cft_a[i-1]-1;
Cft_b[i]=Cft_b[i-2]+Cft_b[i-1]+1;
}
b=(m-a*Cft_a[n-1])/Cft_b[n-1];
printf("%d",a*Cft_a[x]+b*Cft_b[x]);
return 0;
}
by 0822ljy @ 2018-09-24 09:14:03
# **没加return 0;系统不喜欢**
by Lates @ 2018-12-09 21:30:43
# 系统爱return 0;
### 你不打return 0就是可以让你直接报错
by 南楼故语 @ 2019-02-21 20:58:33
### return 0是个好东西,可惜你不用
by 南楼故语 @ 2019-02-21 20:59:31
# 不写`return 0;`成绩${return }$ **$\color{red}{0}$**!!!!!!!!!!!!!
by littlefrog @ 2019-07-16 21:07:51