the way to find the number in fibbonachi

Revision ru1, by C0d3Wh1z, 2024-12-28 11:01:24

include <bits/stdc++.h>

define ll long long

using namespace std;

int main() { ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); ll dol; cin >> dol; ll pdiddy[dol + 10]; pdiddy[1] = pdiddy[2] = 1; for(ll i = 3; i <= dol; i++){ pdiddy[i] = pdiddy[i — 1] + pdiddy[i — 2]; } cout << pdiddy[dol]; return 0; }

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
ru1 Russian C0d3Wh1z 2024-12-28 11:01:24 434 Первая редакция (опубликовано)