会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
Tricia
博客园
首页
新随笔
联系
管理
订阅
2022年3月16日
斐波那契数列
摘要: #include <iostream> using namespace std; int n,a,b,p; int f(int x){ if(x <= 2){ return 1; } return (a*f(x-1)+b*f(x-2))%p; } int main() { cin>>n>>a>>b>
阅读全文
posted @ 2022-03-16 15:27 Tricia11
阅读(9)
评论(0)
推荐(0)
公告