fork download
  1. program domino;
  2. var x, L, M:integer;
  3. begin
  4. readln(x);
  5. L:=0; M:=0;
  6. while x > 0 do begin
  7. L:= L+1;
  8. if x mod 2 = 0 then
  9. M:= M+X mod 10;
  10. x:=x div 10;
  11. end;
  12. writeln(L); write(M);
  13. end.
Success #stdin #stdout 0.01s 5288KB
stdin
Standard input is empty
stdout
0
0