Go: package main

/*
フィボナッチ数列
*/

import (
	"bufio"
	"bytes"
	"fmt"
	"log"
	"os"
	"strconv"
	"strings"
)

func fibWithMemo(n int, memo map[int]int) int {
	if n == 0 || n == 1 {
		return 1
	}
	if val, ok := memo[n]; ok {
		return val
	}
	memo[n] = fibWithMemo(n-1, memo) + fibWithMemo(n-2, memo)
	return memo[n]
}

func fib(n int) int {
	memo := make(map[int]int)
	return fibWithMemo(n, memo)
}

func main() {
	scanner := makeScanner(1024)
	n := eGetInt(scanner)
	fmt.Println(fib(n))
}

////////////////////////////////////////////////////////////////////////////////
// ライブラリ
////////////////////////////////////////////////////////////////////////////////
func makeScanner(maxByte int) *bufio.Scanner {
	scanner := bufio.NewScanner(os.Stdin)
	scanner.Buffer(make([]uint8, 0, 8192), maxByte)
	return scanner
}
func makeWordScanner() *bufio.Scanner {
	scanner := makeScanner(8192)
	scanner.Split(bufio.ScanWords)
	return scanner
}
func eGetLine(r *bufio.Scanner) string {
	if r.Scan() {
		return r.Text()
	}
	err := r.Err()
	if err != nil {
		log.Fatal(err)
	}
	// EOF
	return ""
}
func eGetInt(r *bufio.Scanner) int {
	line := eGetLine(r)
	return eAtoi(line)
}
func eGetFields(r *bufio.Scanner) []string {
	line := eGetLine(r)
	return strings.Fields(line)
}
func eGetInts(r *bufio.Scanner) []int {
	fields := eGetFields(r)
	ints := make([]int, len(fields))
	for i := 0; i < len(ints); i++ {
		ints[i] = eAtoi(fields[i])
	}
	return ints
}
func eGetChars(r *bufio.Scanner) []string {
	line := eGetLine(r)
	return strings.Split(line, "")
}
func eAtoi(s string) int {
	n, err := strconv.Atoi(s)
	if err != nil {
		log.Fatal(err)
	}
	return n
}

type ints []int

func (s ints) String() string {
	var buf bytes.Buffer
	buf.WriteString("[")
	sep := ""
	for _, v := range s {
		buf.WriteString(fmt.Sprintf("%s%d", sep, v))
		sep = ", "
	}
	buf.WriteString("]")
	return buf.String()
}

func reverse(a ints) ints {
	r := make(ints, len(a))
	for i := 0; i < len(a); i++ {
		r[i] = a[len(a)-1-i]
	}
	return r
}
func max(a ints) (int, bool) {
	if len(a) == 0 {
		return 0, false
	}
	m := a[0]
	for _, e := range a {
		if e > m {
			m = e
		}
	}
	return m, true
}
func min(a []int) int {
	m := a[0]
	for _, v := range a {
		if v < m {
			m = v
		}
	}
	return m
}

func sum(a ints) int {
	if len(a) == 0 {
		return 0
	}
	sum := 0
	for _, e := range a {
		sum += e
	}
	return sum
}
func find(n int, a ints) int {
	for i, v := range a {
		if n == v {
			return i
		}
	}
	return -1
}

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;
}

C++: #include <iostream>
#include <algorithm>
#include <vector>
#include <deque>
#include <queue>
#include <list>
#include <stack>
#include <string>
#include <tuple>
#include <functional>
#include <numeric>
#include <cmath>
#include <iomanip>
#include <map>
#include <random>
#include <cstdlib>
#define INT_MAX 2147483647
#define INT_MIN -2147483646
#define Loop(i, n) for(int i = 0; i < (int)n; i++)
#define Loop1(i, n) for(int i = 1; i <= (int)n; i++)
#define Loopr(i, n) for(int i = (int)n - 1; i >= 0; i--)
#define Loopr1(i, n) for(int i = (int)n; i >= 1; i--)
using namespace std;
typedef long long int ll;

vector<ll> A(100);

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

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

int A[51];

void func(int n){
  if(n==50) return;
  A[n]=A[n-1]+A[n-2];
  func(n+1);
}

int main(){
  int n;
  cin >> n;
  A[0]=1; A[1]=1;
  func(2);

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

C++: #include <cstdio>

using namespace std;

int sum = 0;

int fib( int n ){

    if( n >= 0) {

        if( n == 0 || n == 1 ){

            return 1;

        } else {

            sum = fib( n - 1 ) + fib( n - 2 );        

        }

    } else return 0;

    return sum;

}

int main(){

    int n;

    scanf("%d", &n);

    int ans = fib(n);

    printf("%d\n", ans);

}

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

int fib[46]={};
int n = 0 ;

int main(){
    
	cin >> n ;

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

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


cout << fib[n] << endl ;

  return 0;
}