var x, L, M: integer;
begin
readln(x);
L:=0; M:=0;
while x > 0 do begin
L:= L + 1;
if x mod 2 = 0 then
M:= M + x mod 10;
x:= x div 10;
end;
writeln(L); write(M);
end.
|
int x, L, M;
scanf("%d",&x);
L = 0; M = 0;
while(x > 0)
{
L=L+1;
if (x % 2 == 0) M = M + x % 10;
x = x / 10;
}
printf("%d \n",L); printf("%d",M);
|