Cod sursa(job #174060)

Utilizator hadesgamesTache Alexandru hadesgames Data 8 aprilie 2008 14:05:18
Problema Koba Scor 0
Compilator cpp Status done
Runda Arhiva de probleme Marime 0.46 kb
#include <stdio.h>
int ciclu(int x,int y,int t,int z,int x2,int y2,int t2)
{
	
}
int main()
{
	FILE *in,*out;
	in=fopen("koba.in","r");
	out=fopen("koba.out","w");
	fscanf(in,"%d%d%d%d",&n,&x,&y,&t);
	x%=10;
	y%=10;
	t%=10;
	for (i=1;i<=n;i++)
	{
		if (!v[x*100+y*10+t])
		{
			ciclu(x,y,t,0,x,y,t);
		}
                if (v[x*100+y*10+t]+i<=n)
		{
			i+=v[x*100+y*10+t];
			nr+=s[x*100+y*10+t];
		}
		else
		{
			aux=t;
			t=y;
			y=x;
			x=(y+t*aux)%10;
			nr+=x;
		}
	}
}