Submission #00059


ソースコード

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#include <bits/stdc++.h>
using namespace std;
int main(){
int n;
cin>>n;
long long ans[n];
ans[0] = 1;
ans[1] = 1;
for(int i = 2;i < n;i++){
ans[i] = ans[i - 1] + ans[i - 2];
}
cout<<ans[n - 1]<<"\n";
return(0);
}

ステータス

項目 データ
問題 0002 - ハローキティーのあずきバー工場
ユーザー名 m2219
投稿日時 2022-08-15 20:31:43
言語 C++
状態 Accepted
得点 30
ソースコード長 259 Byte
最大実行時間 29 ms
最大メモリ使用量 708 KB

セット

セット 得点 Cases
1 ALL 30 / 30 *

テストケース

ファイル名 状態 実行時間 メモリ使用量 #
test01.txt AC 29 ms 604 KB
1
test02.txt AC 19 ms 708 KB
1
test03.txt AC 19 ms 552 KB
1
test04.txt AC 22 ms 652 KB
1
test05.txt AC 27 ms 624 KB
1
test06.txt AC 18 ms 592 KB
1
test07.txt AC 21 ms 564 KB
1
test08.txt AC 19 ms 536 KB
1