Cod sursa(job #257704)
Utilizator | Data | 13 februarie 2009 20:47:39 | |
---|---|---|---|
Problema | Text | Scor | 0 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.35 kb |
#include <stdio.h>
void rezolvare()
{
char x;
int len=0,cuv=0,k=0,sol;
while(scanf("%u",&x) != EOF)
{
if (scanf("%u",&x))
{
len+=1;
if (k==0)
cuv+=1;
k=1;
}
else
k=0;
}
sol=len/cuv;
printf("%d",sol);
}
int main()
{
freopen("text.in","r",stdin);
freopen("text.out","w",stdout);
rezolvare();
return 0;
}