WanderingTrader @ 2020-04-03 15:21:00
90分 #6WA 今日下载已到上限
by _十十十十_ @ 2020-04-03 15:21:27
您代码发出来
by HsKr @ 2020-04-03 15:22:08
为什么不当红名呢
by CarroT1212 @ 2020-04-03 15:23:00
先问下,是不是没有高精度
by tangrunxi @ 2020-04-03 15:23:40
借楼问一下,每天最多能下载多少次啊
by FCBM71 @ 2020-04-03 15:59:47
伸手党,还要别人付出代价,举报不谢
by JeffWang2019 @ 2020-04-03 16:00:23
@tangrunxi 红名貌似是8次
by btng_smith666 @ 2020-04-03 16:04:31
@FCBM71 您对举报是有多么痴迷呀
by WanderingTrader @ 2020-04-03 16:50:19
#include<bits/stdc++.h>
using namespace std;
#define N 5005
int a[N][N] = {{1},{1}},l[N] = {1,1};
void add(int x,int y,int z){
l[z] = max(l[x],l[y]);
for(int i = 0;i < l[z];i ++){
a[z][i] += a[x][i] + a[y][i];
a[z][i + 1] += a[z][i] / 10;
a[z][i] %= 10;
}
if(a[z][l[z]])l[z] ++;
}
void output(int x){
for(int i = l[x] - 1;i >= 0;i --){
cout << a[x][i];
}
}
int main()
{
int n;
cin >> n;
for(int i = 2;i <= n;i ++){
add(i - 2,i - 1,i);
}
output(n);
return 0;
}
没有高精度只能得60分
by WanderingTrader @ 2020-04-03 16:51:57
是不是有特殊数据没考虑到??大佬帮忙看看
by WanderingTrader @ 2020-04-03 18:21:59
n = 0没有考虑到,已经AC了,谢谢各位大佬的帮助