Go: package main

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

func main() {
	sc := bufio.NewScanner(os.Stdin)
	sc.Split(bufio.ScanWords)
	n, err := nextInt(sc)
	if err != nil {
		panic(err)
	}
	fmt.Println(fibonacci(n, make(map[int]int)))
}

func fibonacci(x int, memo map[int]int) int {
	if x == 0 || x == 1 {
		return 1
	}
	if y, ok := memo[x]; ok {
		return y
	}
	z := fibonacci(x-1, memo) + fibonacci(x-2, memo)
	memo[x] = z
	return z
}

func nextInt(sc *bufio.Scanner) (int, error) {
	sc.Scan()
	return strconv.Atoi(sc.Text())
}

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

long long F[100];

int fiv(long long N){
  if(N==0){
    return 1;
  }
  if(N==1){
    return 1;
  }
  if(F[N]!=0){
    return F[N];
  }
  return F[N]=fiv(N-1)+fiv(N-2);
}

  
int main(){
  long long N;
  cin>>N;
  for (int i=0;i<100;i++){
    F[i]=0;
  }
  cout<<setprecision(20)<<fiv(N)<<endl;
  return 0;
 }

C++: #include<cstdio>
#define rep(i,a) for(int i=0;i<(a);++i)

const int MAX_N = 44;

int n;
int fib[MAX_N+1];

int main()
{
    scanf( "%d", &n );

    fib[0] = 1, fib[1] = 1;

    rep( i, n-1 )
        fib[i+2] = fib[i] + fib[i+1];

    printf( "%d\n", fib[n] );

    return 0;
}

C++: #include <bits/stdc++.h>
#define rep(i, n) for(i = 0; i < n; i++)
using namespace std;

/// TLE
// int fib(int n) {
//     if (n == 0 || n == 1) {
//         return 1;
//     }
//     return fib(n-1) + fib(n-2);
// }

int main() {
    int n;
    cin >> n;
    vector<int> f(n+1);
    f[0] = 1;
    f[1] = 1;;
    for (int i=2; i<=n; i++) {
        f[i] = f[i-1] + f[i-2];
    }

    cout << f[n] << endl;

    return 0;
}

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

int main(int argc, char const *argv[])
{
  int n; cin >> n ;
  int F[50];
  F[0] = F[1] = 1;
  for (int i = 2 ; i < n; ++i)
  {
    F[i] = F[i-1] + F[i- 2];
  }

  cout << F[n] << endl;

  return 0;
}

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

int main(int argc, char const *argv[])
{
    int a, *Fibonacci;
    cin >> a;
    Fibonacci = (int *)malloc((a+1) * sizeof(int));
    Fibonacci[0] = Fibonacci[1] = 1;
    for(int i=2; i<=a; ++i) {
        Fibonacci[i] = Fibonacci[i-1] + Fibonacci[i-2];
    }
    cout << Fibonacci[a] << endl;
    return 0;
}

C++: #include <bits/stdc++.h>

using namespace std;

int fibo(int n){
    if(n < 2) return 1;
    return fibo(n-1)+fibo(n-2);
}

int main(){
    int n; cin >> n;
    cout << fibo(n) << endl;
}

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

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

C++: #include <iostream>
using namespace std;
int main(){
	int n; cin>>n;
	int r[] = {1,1,2};
	if( n<=2 ){
		cout<<r[n]<<endl;
		return 0;
	}
	while( n>0 ){
		int tmp = r[1] + r[2];
		r[0] = r[1]; r[1] = r[2]; r[2] = tmp;
		n = n-1;
	}
	cout<<r[0]<<endl;
	return 0;
}

C++: #include <iostream>
#include <stdio.h>
#define MAX 50
using namespace std;

int main(int argc, char *argv[])
{
    int n;
    int fib[MAX] = {0};
    fib[0] = 1;
    fib[1] = 1;
    scanf("%d", &n);
    if (n < 2)
    {
        printf("%d\n", 1);
        return 0;
    }

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

C++: #include <bits/stdc++.h>

#define REP(i ,n) for(int i=0 ;i < n; i++)
#define REPB(i ,n) for(int i=n; i >= 0; i--)
#define FOR(i ,m ,n) for(int i=m; i < n; i++)
#define FORB(i, m, n) for(int i=m; i>= m; i--)
#define ll long long
#define pb push_back
#define popb pop_back
using namespace std;
vector<int> f;
int makeFib(int k){
    f.pb(1);
    f.pb(1);
    if(k >= 2){
    FOR(i,2,(k + 1)){
        f.pb(f[i - 2] + f[i - 1]);
      }
    }
      return f[k];
  }
int main(){
  int n;
  cin >> n;

  cout << makeFib(n) << endl;
}

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

int dp[50];

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

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

signed main() {
  int n; cin >> n;
  int f[50];
  f[0] = f[1] = 1;

  // メモ化再帰
  for(int i = 2; i <= n; i++) {
    f[i] = f[i-1]+f[i-2];
  }
  cout << f[n] << endl;
  return 0;
}

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

int main() {
  vector<int> fib(100, 0);
  fib[0]=fib[1]=1;
  for (int i=2; i<100; i++) fib[i]=fib[i-1]+fib[i-2];
  int n; cin>>n;
  cout<<fib[n]<<endl;
}

C++: /*
http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=ALDS1_10_A&lang=jp
*/
#include<iostream>
using namespace std;
typedef long long ll;
#define rep(s,e) for(int i=s;i<e;i++)
ll A[44];
ll Fibo(int n){
  if(n==0 || n==1) return 1;
  if(A[n]!=0) return A[n];
  A[n-1]=Fibo(n-1);
  return A[n-1]+A[n-2];
}
int main(){
  int n;
  cin>>n;
  A[0]=A[1]=1;
  cout<<Fibo(n)<<"\n";
}

C++: #include <iostream>

using namespace std;

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

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

int fibo(int x) {
  int a;
  if ( x == 0 ) return 1;
  if ( x == 1 ) return 1;
  a = fibo(x-1) + fibo(x-2);
  return a;
}

int main() {
  int x, y;
  int F[50];
  F[0] = F[1] = 1;
  for ( i = 2; i < 50; i++ ) F[i] = F[i-1] + F[i-2];

  cin >> x;
  cout << F[x] << endl;

  return 0;
}

C++: #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;


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

C++: #include <iostream>
  
using namespace std;
  
typedef unsigned long long ull;
  
int main()
{
    ull t[45] = { 1, 1 };
    for( int i=2; i<45; ++i )
        t[i] = t[i-1] + t[i-2];
    ull n;
    cin >> n;
    cout << t[n] << endl;
}

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


int fib(int n){
	  if(n==0 or n==1) return 1;
	  return fib(n-1) + fib(n-2);
}

int main (){

	  int n;
	  cin >> n;
	  cout << fib(n) << endl;

}

C++: #include <iostream>

using namespace std;

int main()
{
	int a=1,b=1,n;
	cin>>n;
	for (int i=0; i<n-1; i++) {
		swap(a,b);
		a+=b;
	}
	cout<<a<<endl;
}

C++: #include <iostream>

const int MAX_SIZE = 44 + 1;

int main() {
  int f[MAX_SIZE] = {0};
  
  int n = 0;

  std::cin >> n;

  f[0] = 1;
  f[1] = 1;

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

  std::cout << f[n] << std::endl;

  
  return 0;
}

C++: #include <iostream>

using namespace std;

int N;
unsigned long memo[50] = {};

unsigned long fibo(unsigned n)
{
	if (n <= 1) return 1;
	if (memo[n] == 0) {
		memo[n] = fibo(n - 1) + fibo(n - 2);
	}
	return memo[n];
}

int main()
{
	cin >> N;

	cout << fibo(N) << endl;

	return 0;
}

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

int f[50];

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

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

	fill(f, f + 50, 0);

	int N; cin >> N;
	cout << fib(N) << endl;
}

C++: #include <iostream>
using namespace std;
#include <cstdio>
#include <cmath>
#include <cstring>
#include <string>
#include <algorithm>
#include <functional> //sort(A,A.end(),greater<int>());???????????????
#include <queue>
#include <stack>
#include <vector>

#define INF 10 << 10

int main() {
	int n;
	int dp[64];
	dp[0] = 1; dp[1] = 1;

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

	return 0;
}