Go: package main

import (
	"fmt"
)

func main() {
	var n int
	fmt.Scan(&n)

	fibo := make([]int, n+1)
	fibo[0] = 1
	fibo[1] = 1

	for i := 2; i <= n; i++ {
		fibo[i] = fibo[i-1] + fibo[i-2]
	}

	fmt.Println(fibo[n])
}

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

ll N, M, score=0;
vector<ll> Fib;

void dp(){
    for(int i=2;i<=N;i++) Fib[i] = Fib[i-1]+Fib[i-2];
}

signed main(){
    cin >> N;
    Fib.resize(N+1);
    Fib[0]=1;
    Fib[1]=1; 
    dp();
    cout << Fib[N] << endl;
    return 0;
}

C++: #include <bits/stdc++.h>
using namespace std;
#define _GLIBCXX_DEBUG
const int INF_INT = 2147483647;
const long long INF_LONG = 9223372036854775807;
using ll = long long;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
     
int main() {
  int n;  cin >> n;

  vector<ll> v(100);
  v[0] = 1;
  v[1] = 1;

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

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

C++: #include <bits/stdc++.h>
using namespace std;
#define int long long
#define rep(i, n) for(int i = 0; i < n; i++)
#define all(a) a.begin(), a.end()
#define P pair<int, int>
#define F first
#define S second
#define prime 1000000007
#define INF 40000000000000000
int dx8[8] = {-1, 0, 1, 1, 1, 0, -1, -1};
int dy8[8] = {1, 1, 1, 0, -1, -1, -1, 0};
int dx4[4] = {-1, 0, 1, 0};
int dy4[4] = {0, -1, 0, 1};
signed main(void) {
    int fib[48];
    fib[0] = 1;
    fib[1] = 1;
    rep(i, 45) fib[i + 2] = fib[i + 1] + fib[i];
    int n;
    cin >> n;
    cout << fib[n] << endl;
}

C++: // fibonacci
#include<iostream>
#define MAX 50
long f(long);
long F[MAX],n;
int main(){
  long i;
  std::cin >> n;
  for(i=0; i<MAX; i++) F[i] = -1;
  std::cout << f(n) << "\n";
  return 0;
}
long f(long n){
  if(n == 1 || n == 0) return F[n] = 1;
  if(F[n] != -1) return F[n];
  return F[n] = f(n - 2) + f(n - 1);
}

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


int main() {
  int n;
  cin >> n;
  vector<int> fibo(n);
  
  for(int i = 0;i < n;i++){
      if(i == 0){
          fibo.at(i) = 1;
      }else if(i == 1){
          fibo.at(i) = 2;
      }else{
          fibo.at(i) = fibo.at(i-1)+fibo.at(i-2);
      }
  }
  cout << fibo.at(n-1) << endl;
  
}

C++: #include<iostream>
#include<cstdio>
#include<string>
#include<algorithm>

using namespace std;

int fib_t[45] = {0};

int fib(int i){
    if (i <= 1) return 1;
    if (fib_t[i] != 0) return fib_t[i];
    int nacci;
    nacci = fib(i-1) + fib(i-2);
    fib_t[i] = nacci;
    
    return nacci;
}

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

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

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

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

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

C++: // #Sazaの1日1AC
#include <bits/stdc++.h>
using namespace std;
const long long mod = 1000000000 + 7;
const long long INF = 9e18;
const double PI = 3.14159265358979323846;

//マクロ
//型エイリアス
using ll = long long;
using P = pair<long long, long long>;
using vl = vector<long long>;
using vvl = vector<vector<long long>>;
using vP = vector<pair<long long, long long>>;
//ショートカット
#define rep(i, n) for (int i = 0; i < n; i++)
#define rep2(i, k, n) for (int i = k; i < n; i++) //半開区間
#define all(v) v.begin(), v.end()
#define rall(v) v.rbegin(), v.rend()
#define pb push_back
#define mkp make_pair
//入力
#define vin(v, N) for (long long i = 0; i < N; i++) cin >> v.at(i)
#define lin(n)long long n;cin >> n
#define chin(x)char x;cin >> x;
#define sin(s)string s;cin >> s;
#define vlin(v, N)vector<long long> v(N);for (long long i = 0; i < N; i++)cin >> v.at(i)
#define max(a, b) max((ll)a, (ll)b)
#define min(a, b) min((ll)a, (ll)b)

//関数
//最大公約数
long long gcd(long long m, long long n){
  long long a = max(m, n);
  long long b = min(m, n);
  long long r = a % b;
  while (r != 0){
    a = b;
    b = r;
    r = a % b;
  }
  return b;
}
// 最小公倍数
long long lcd(long long m, long long n){
  return m * n / gcd(m, n);
}
//xのn乗
long long power(long long x, long long N){
  long long ret = 1;
  for (long long i = 0; i < N; i++)
    ret *= x;
  return ret;
}
//繰り返し二乗法
long long repeat_squaring(long long x, long long n){
  if (n == 0)
    return 1;
  else if (n % 2 == 0)
  {
    long long t = repeat_squaring(x, n / 2);
    return t * t % mod;
  }
  else
    return x * repeat_squaring(x, n - 1);
}
//素因数分解(mapで返す)
map<long long, long long> factor(long long p){
  ll p1 = p;
  map<long long, long long> ret;
  for (long long i = 2; i * i <= p1; i++)
  {
    while (p % i == 0)
    {
      ret[i]++;
      p /= i;
    }
  }
  if (p != 1)
    ret[p]++;
  return ret;
}
//素数判定
bool is_prime(long long N){
  for (long long i = 2; i * i <= N; i++)
  {
    if (N % i == 0)
      return false;
  }
  return true;
}
//最大値更新
void chmax(long long &a, long long b){
  a = max(a, b);
}
//最小値更新
void chmin(long long &a, long long b){
  a = min(a, b);
}

//構造体
//Union-Find木
struct UnionFind
{
  //メンバ変数
  vector<long long> par; //par[i]:=頂点iの親
  vector<long long> s;   //s[i]:=頂点iが属する集合の個数(iが根のとき)

  //コンストラクタ
  UnionFind(long long N) : par(N), s(N){
    for (long long i = 0; i < N; i++)
    {
      par[i] = i; //最初はすべてが根として初期化
      s[i] = 1;
    }
  }
  //メンバ関数
  //root(i):=頂点iの根
  long long root(long long i){
    if (par[i] == i)
      return i;
    par[i] = root(par[i]); //経路圧縮
    return root(par[i]);   //再帰
  }
  //size[i]:=iが属する集合の個数
  long long size(long long i){
    return s[root(i)];
  }
  //same(x,y) xとyが同じ根を持つか(同じ集合に含まれるか)
  bool same(long long x, long long y){
    return root(x) == root(y);
  }
  //unite(x,y) xの根をyの根に繋げる(集合を合併)
  void unite(long long x, long long y){
    if (!same(x, y)){
      long long rx = root(x);
      long long ry = root(y);
      par[rx] = par[ry];
      s[ry] = s[rx] + s[ry];
    }
  }
};
//Binary Indexed Tree
struct BIT{
  vector<long long> bit;
  long long N;

  BIT(long long n){
    N = n;
    bit.resize(N + 1);
  }

  void add(long long i, long long w){
    for (long long x = i; x <= N; x += x & -x){
      bit[x] += w;
    }
  }
  long long sum(long long i){
    long long ret = 0;
    for (long long x = i; x > 0; x -= x & -x){
      ret += bit[x];
    }
    return ret;
  }
};
/////////////////⊂('ω'⊂ )))Σ≡GO!/////////////////



int main(){
  //doubleの桁数
  cout << fixed << setprecision(10);

  lin(N);
  vl dp(100);
  dp[0] = 1;
  dp[1] = 1;
  for(int i = 2; i < 100; i++) dp[i] = dp[i-1] + dp[i-2];

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

C++: #include<stdio.h>

#define MAX 50

int db[MAX];

int fibonacci(int n) {
    if (n == 0 || n == 1) return 1;
    if (db[n] != -1) return db[n];
    return fibonacci(n - 1) + fibonacci(n - 2);

}

int main() {
    int n;
    for (int i = 0; i < MAX; ++i) db[i] = -1;

    scanf("%d", &n);
    int result = fibonacci(n);
    printf("%d\n", result);
    return 0;
}