求80分原因

P2626 斐波那契数列(升级版)

``` #include<bits/stdc++.h> using namespace std; const long long int mod=2147483648; long long n; void shit(int x){ int i=2; while(x>1){ while(x%i==0){ if(x/i!=1) cout<<i<<"*"; else cout<<i; x/=i; } i++; } } int fn(long long n){ if(n==1||n==2) return 1; else return fn(n-1)+fn(n-2); } int main(){ cin>>n; cout<<fn(n)%mod<<"="; shit(fn(n)); cout<<"\n"; return 0; } ```
by Chtholly_Tree_qwq @ 2018-10-06 09:03:48


希望更丰富的展现?使用Markdown
by info___tion @ 2018-10-06 09:04:33


递归没加记忆化的问题吧
by NaCly_Fish @ 2018-10-06 09:17:31


@[NaCly_Fish](/space/show?uid=115864) +1
by Lskkkno1 @ 2018-10-06 09:28:16


@[阡陌OI](/space/show?uid=94348) 兄嘚,要边做边取模,勃然会炸的。
by Smile_Cindy @ 2018-10-06 09:50:29


@[Alpha](/space/show?uid=87058) 谢谢神犇
by Chtholly_Tree_qwq @ 2018-10-07 17:41:27


orzct
by GHJhandsome @ 2018-11-17 15:03:19


|