Submission

Status:

PPPPPTTTTT

Subtask/Task Score:

50/100

Score: 50

User: goine

Problemset: อนุกรม

Language: cpp

Time: 1.098 second

Submitted On: 2025-10-11 22:30:26

#include<iostream>

using namespace std;

int fib(int n) {
	if (n <= 1) return n;
	else return (fib(n - 1) + fib(n - 2));
}

int main() {
	int x;
	cin >> x;
	cout << fib(x);
	return 0;
}