Submission
Status:
PPPPP-----
Subtask/Task Score:
50/100
Score: 50
User: Whatthepoop
Problemset: อนุกรม
Language: c
Time: 0.002 second
Submitted On: 2025-10-11 10:12:21
#include <stdio.h>
int main() {
int n;
scanf("%d", &n);
long long a = 1;
long long b = 1;
long long c;
if(n == 1 || n == 2) printf("1");
else{
for(int i = 2; i < n; i++){
c = a+b;
a=b;
b=c;
}
printf("%d", b);
}
return 0;
}