Go: package main

import (
	"bufio"
	"fmt"
	"os"
	"strconv"
)

//util
var sc = bufio.NewScanner(os.Stdin)

func nextStr() string {
	sc.Scan()
	return sc.Text()
}

func nextInt() int {
	sc.Scan()
	i, e := strconv.Atoi(sc.Text())
	if e != nil {
		panic(e)
	}
	return i
}

func printList(list []int) {
	buf := bufio.NewWriter(os.Stdout)
	for _, v := range list {
		buf.Write([]byte(fmt.Sprintf(" %d", v)))
	}
	buf.Write([]byte("\n"))
	buf.Flush()
}

//solve
//単純な場合
func fibonacci_(n int) int {
	if n == 0 || n == 1 {
		return 1
	}
	return fibonacci_(n-2) + fibonacci_(n-1)
}

//メモ再帰の利用
func fibonacci(n int) int {
	if n == 0 || n == 1 {
		F[n] = 1
	}
	//F[n]が計算済みの場合
	if F[n] > 0 {
		return F[n]
	}
	F[n] = fibonacci(n-2) + fibonacci(n-1)
	return F[n]
}

const MAX = 50

var F [MAX]int

func main() {
	sc.Split(bufio.ScanWords)
	n := nextInt()
	fmt.Println(fibonacci(n))

}

C++: #include<iostream>


/*
auto fib(int x)->int {

	return
		x <= 1 ? 1 : fib(x - 1) + fib(x - 2);
}*/

using ull = unsigned long long;

int main() {

	int n;
	std::cin >> n;
	
	ull tab[45]{};

	auto ans = [](auto f_, auto x) {
		return 
			f_(f_, x);
	}(
		[&](auto f, auto n) ->ull {
		return
			n <= 1 ? 1 :
			tab[n] == 0 ? tab[n] = f(f, n - 1) + f(f, n - 2) : tab[n];

		} ,	n);
	
//	std::cout << fib(3) << "\n";
	std::cout << ans << "\n";

//	std::cin >> ans;

	return 0;
}

C++: #include<iostream>
using namespace std;

int main()
{
	ios::sync_with_stdio(false);
	cin.tie(0);

	int n, N[50];
	N[0] = N[1] = 1;
	cin >> n;

	for (int i = 2; i <= n; i++)
		N[i] = N[i - 1] + N[i - 2];

	cout << N[n]<<endl;
	return 0;
}

C++: #include <iostream>
using namespace std;

const int MAX = 44;
int F[MAX];

int fib(int n){
  if(n==0 || n==1) return F[n];
  if(F[n] != -1) return F[n];
  return F[n] = fib(n-1) + fib(n-2);
}


int main() {
    ios::sync_with_stdio(false);

    F[0] = F[1] = 1;
    for(int i=2; i<MAX; i++) F[i] = -1;

    int n;
    cin >> n;
    cout << fib(n) << endl;
    return 0;
}

C++: #include <cstdio>
#include <vector>

typedef std::vector<int> Memo;

int fib(int n, Memo& memo) {
    if(n == 0 || n == 1) return 1;
    if(memo[n] != -1) return memo[n];
    return memo[n] = fib(n-1, memo) + fib(n-2, memo);
}

int main() {
    int n = 0;
    Memo memo = Memo(50, -1);
    
    std::scanf("%d", &n);
    std::printf("%d\n", fib(n, memo));
}

C++: #include <bits/stdc++.h>
#define rep(i, to) for (int i = 0; i < (to); i++)
#define rrep(i, to) for (int i = (to) - 1; i >= 0; i--)
#define repf(i, from, to) for (int i = (from); i < (to); i++)
#define all(v) v.begin(), v.end()
#define unless(cond) if (!(cond))
using namespace std;
using ll = long long;
template <typename T>
using V = vector<T>;
template <typename T, typename U>
using P = pair<T, U>;

int main() {
  int n;
  V<int> fibo;

  cin >> n;
  fibo.resize(n + 1);

  fibo[0] = fibo[1] = 1;

  repf(i, 2, n + 1) {
    fibo[i] = fibo[i - 1] + fibo[i - 2];
  }

  cout << fibo[n] << endl;
}

C++: #coding: UTF-8

s = input()
h = s/3600
s = s%3600
m = s/60
s = s%60

print str(h) + ":" + str(m) + ":" + str(s)

C++: #include<iostream>
#include<algorithm>
#include<vector>

using namespace std;

int main(){
	ios::sync_with_stdio(false);
	cin.tie(0);

	long long int f[45];
	int n; cin >> n;

	f[0] = 1; f[1] = 1;
	for(int i=2;i<=n;i++) f[i] = f[i-1] + f[i-2];

	cout << f[n] << "\n";

	return 0;
}

C++: #include<stdio.h>

int main(){
  int i,n,F[50];
  scanf("%d",&n);
  
  F[0] = 1;
  F[1] = 1;
  for (i=2;i<=n;i++){
    F[i] = F[i-2] + F[i-1];
  }
  printf("%d\n",F[i-1]);
  return 0;

}

C++: #include<iostream>
#include<cstdio>
using namespace std;
typedef long long int ll;
ll Dp[50];
int main()
{
Dp[0]=1;
Dp[1]=1;
for(int i=2;i<50;i++)Dp[i]=Dp[i-1]+Dp[i-2];
int N;
cin >> N;
cout << Dp[N] << "\n";
 
return 0;
}

C++: #include <bits/stdc++.h>
using namespace std;

vector<int> dp;

int f(int n) {
    if (dp[n]) return dp[n];
    if (n <= 1) return dp[n] = 1;
    return dp[n] = f(n - 1) + f(n - 2);
}

int main() {
    int n;
    cin >> n;
    dp.resize(n + 1);
    cout << f(n) << endl;
}

C++: #include <iostream>

using namespace std;
long dp[10000]={0};


long fibo(int a){
  if (a==0 or a==1) return 1L;

  if(dp[a] !=0) return dp[a];
  dp[a] = fibo(a-1)+fibo(a-2);

  return dp[a];

}

int main(){
  long n,req;

  cin >> req;
  n = fibo(req);

  cout <<n<<endl;



  
  return 0;
}

C++: #include <algorithm>
#include <iostream>
#include <queue>
#include <cmath>
#include <string>
#include <iterator>
#include <map>
#include <set>
#include <iomanip>
#include <vector>
using namespace std;
using ll = long long;
using ld = long double;
using P = pair<int, int>;
using Graph = vector<vector<int>>;
int dx[] = {0, 1, 0, -1};
int dy[] = {1, 0, -1, 0};
#define INF 100000000
#define MAX 200001
#define MOD 1000000007
ll fac[MAX], finv[MAX], inv[MAX];
const int MX = 1000005;

int main(){
    int n;cin>>n;
    int dp[50];
    dp[0] = 1;
    dp[1] = 1;
    for(int i=2;i<n+1;i++){
        dp[i] = dp[i-1] + dp[i-2];
    }
    cout<<dp[n]<<endl;
}

C++: #include <bits/stdc++.h>
using namespace std;
#pragma GCC optimize("Ofast")

#define rep(i,n) for(int i = 0;i<n;i++)
const long long MOD = 1000000007;

int main(){
  int n; cin >> n;
  long long fib[n+1];
  fib[0] = 1; fib[1] = 1;
  for(int i = 2; i<=n;i++){
    fib[i] = fib[i-1] + fib[i-2];
  }
  cout << fib[n] << "\n";
}

C++: #include <iostream>
using namespace std;

int fiboArray[44] = {0};
int fibonacci(int anySection) {
	if (anySection == 0 || anySection == 1)
		return (fiboArray[anySection] = 1);

	if (fiboArray[anySection] == 0) { //?¨?????????????????????????
		fiboArray[anySection] = fibonacci(anySection - 1) + fibonacci(anySection - 2);
		return fiboArray[anySection];
	}
	else //?????§????¨?????????????????????????
		return fiboArray[anySection];
}

int main() {
	int anySection;
	cin >> anySection;

	int answer = fibonacci(anySection);

	cout << answer << endl;
	return 0;
}

C++: #include<cstdio>
#include<vector>
#include<algorithm>
#include<utility>
#include<numeric>
#include<iostream>
#include<array>
#include<string>
#include<sstream>
#include<stack>
#include<queue>
#include<list>
#define _USE_MATH_DEFINES

#include<math.h>
#include<map>

#define SENTINEL 1000000001

#define min(a,b) (a)>(b)?(b):(a)
#define max(a,b) (a)>(b)?(a):(b)

using namespace std;

int main()
{
	int fib[50];
	fib[0] = 1;
	fib[1] = 1;

	for (int i = 2; i < 50; i++)
	{
		fib[i] = fib[i - 1] + fib[i - 2];
	}

	int n;
	cin >> n;

	cout << fib[n] << endl;

	return 0;
}

C++: #include<iostream>
#include<vector>
using namespace std;
typedef long long ll;

int main(){
    int N;
    cin >> N;

    // F[0] から F[N] までのメモリを確保
    // 初期値 0 ，N + 1 コの要素
    vector<ll> dp(N+1, 0);

    // 初期条件，フィボナッチ数列の初期値 F[0] と F[1] は 1
    dp[0] = 1;
    dp[1] = 1;

    // 配列 dp の遷移を行う
    for (int i=2; i<=N; i++){
        // 現在の項以前の 2 項を足す処理
        dp[i] += dp[i-1];
        dp[i] += dp[i-2];
        // cout << i << " : " << dp[i] << endl;
    }

    cout << dp[N] << endl;
    return 0;
}

C++: #include<cstdio>
int F[46];
int fib(int flag){
	if(flag<2){
		return 1;
	}else if(F[flag]){
		return F[flag];
	}else{
		return F[flag]=fib(flag-1)+fib(flag-2);
	}
}
int main(){
	int num;
	scanf("%d", &num);
	printf("%d\n", fib(num));
	return 0;
}

C++: #include <algorithm>
#include <cmath>
#include <ctime>
#include <functional>
#include <iostream>
#include <map>
#include <numeric>
#include <set>
#include <sstream>
#include <string>
#include <utility>
#include <vector>
#include <cstring>
#include <tuple>
#include <bitset>
#include <unordered_map>
using namespace std;
typedef long long ll;
int main() {
    ios::sync_with_stdio(false);

    vector<int> fib(50);
    fib[0] = fib[1] = 1;
    for (int i=2; i<50; ++i) {
        fib[i] = fib[i-1] + fib[i-2];
    }

    int n;
    cin >> n;
    cout << fib[n] << endl;

    return 0;
}