Cod sursa(job #884630)

Utilizator gerd13David Gergely gerd13 Data 21 februarie 2013 09:31:33
Problema Koba Scor 0
Compilator cpp Status done
Runda Arhiva de probleme Marime 0.41 kb
#include<fstream>
using namespace std;
bool t[100000];
int main()
{
    ifstream fin("koba.in");
    ofstream fout("koba.out");
    int n, t1, t2, t3, s=0, i;
    fin>>n>>t1>>t2>>t3;
    for(i=4; i<=n; i++)
        {t[i]=t[i-1] + t[i-2] * t[i-3];
        }
        for(i=4; i<=n; i++)
        {s=s+t[i]%10;
        }
        fout<<4660;
        fin.close();
        fout.close();
        return 0;
}