Submission #00022


ソースコード

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#include<stdio.h>
signed main()
{
int n;
scanf("%d",&n);
long long f0,f1,f2;
f0 = 0;
f1 = 1;
long long ans = 1;
int i;
for( i = 0; i < n; ++i ){
ans = f1;
f2 = f0 + f1;
f0 = f1;
f1 = f2;
}
printf("%lld\n",ans);
return 0;
}

ステータス

項目 データ
問題 0005 - ハローキティーのあずきバー工場
ユーザー名 もけ
投稿日時 2019-05-29 17:04:54
言語 C++
状態 Accepted
得点 5
ソースコード長 290 Byte
最大実行時間 29 ms
最大メモリ使用量 672 KB

セット

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

テストケース

ファイル名 状態 実行時間 メモリ使用量 #
test01.txt AC 26 ms 604 KB
1
test02.txt AC 19 ms 456 KB
1
test03.txt AC 17 ms 560 KB
1
test04.txt AC 20 ms 672 KB
1
test05.txt AC 25 ms 524 KB
1
test06.txt AC 29 ms 628 KB
1
test07.txt AC 22 ms 484 KB
1
test08.txt AC 24 ms 592 KB
1