Home > Back-end >  Digital eigenvalue for DEV test results is no problem, in oj error
Digital eigenvalue for DEV test results is no problem, in oj error

Time:10-30

# include" stdio.h "
# include "math. H"
Int main ()
{
Long int n, b=0;
The scanf (" % ld ", & n);
Long int m=n;
While (n!=0)
{
N/a=10;
B++;
}
Long int a [b];
b=0;
While (m!=0)
{
[b]=10 m %;
M/=10;
B++;
}
Int p=0;
Int c [b];
For (int g=0; G {
If (a [g] % 2==(g + 1) % 2) c [p]=1;
Else if (a [g] % 2! C=(g + 1) % 2) [p]=0;
p++;
}
int k;
For (int z=0; Z Printf (" % d ", k);
}
  • Related