Cod sursa(job #308309)
Utilizator | Data | 26 aprilie 2009 18:47:02 | |
---|---|---|---|
Problema | Koba | Scor | 0 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.25 kb |
#include<fstream.h>
long n,t,t2,t3,t1,s;
int main()
{
ifstream f("koba.in");
ofstream g("koba.out");
f>>n>>t>>t2>>t3;
t%=10;
t2%=10;
t3%=10;
s+=t+t2+t3;
t1=(t+t2*t3)%10;
t=t2;t2=t3;t3=t1;
s+=t1;
g<<s<<'\n';
g.close();
return 0;
}