Submission

Status:
-PPPPPPPPP

Score: 90

User: punnatat5354

Problemset: อนุกรม

Language: cpp

Time: 0.002 second

Submitted On: 2025-01-12 20:19:29

#include<iostream>
#include<cmath>

using namespace std;
int main()
{
	long long int a = 1 ;
	long long int b = 1 ;
	long long int n ;
	long long int c ;
	cin >> n ;
	c = a + b ;
	n = n - 3 ;
	for(int i = 1  ;i <= n  ; i = i + 1){
		a = b ;
		b = c ;
		c = a + b ;
	}	
	cout << c ;
}