Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
141608 罗晟睿 斐波那契数列 C++ Wrong Answer 1 MS 268 KB 250 2025-12-27 15:23:33

Tests(0/11):


Code:

#include<bits/stdc++.h> using namespace std; int main(){ int m; scanf("%d",&m); for(int j=1;j<=m;j++){ int n,a1=1,a2=1,a=1; cin>>n; for(int i=3;i<=n;i++){ a=a1+a2; a1=a2; a2=a; } cout<<a<<endl; } return 0; }


Run Info:

------Input------
36
------Answer-----
14930352
------Your output-----
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1