Pagini recente » Cod sursa (job #1735482) | Cod sursa (job #776922) | Cod sursa (job #1906286) | Cod sursa (job #895133) | Cod sursa (job #174060)
Cod sursa(job #174060)
#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;
}
}
}