Cod sursa(job #275340)

Utilizator mathboyDragos-Alin Rotaru mathboy Data 10 martie 2009 13:23:35
Problema Koba Scor 0
Compilator cpp Status done
Runda Arhiva de probleme Marime 0.24 kb
#include <fstream.h>
ifstream f("koba.in");
ofstream g("koba.out");
int main()
{
long long n,i,s,x,y,z,t;
f>>n>>x>>y>>z;
x=x%10;y=y%10;z=z%10;s=x+y+z;
for(i=4;i<=n;i++)
	{ t=(z%10+y%10*x%10);
	s+=t%10;
	}
	g<<s;
	return 0;
        }