Submission

Status:

----------

Subtask/Task Score:

0/100

Score: 0

User: Newton4566

Problemset: ลูกเต๋า (2566)

Language: cpp

Time: 0.004 second

Submitted On: 2026-10-10 15:47:57

#include <iostream>
using namespace std;

int main () {
    ios_base::sync_with_stdio(false);
    cin.tie(nullptr);

    int n;
    cin >> n;

    long long a = 1, b = 1;

    for (int i = 2; i < n; i++) {
        long long temp = a + b;
        a = b;
        b = temp;
    }

    cout << b;

}