about summary refs log tree commit diff
path: root/others/volume1/003.pas
blob: a4818da2efa4b6a883fac7e41d78f511bcd4e03b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
var
  n: int64;
  l, s: byte;

begin
  readln(n);
  l := 0;
  s := 0;
  repeat
    inc(l);
    s := s + n mod 10;
    n := n div 10
  until n = 0;
  writeln(l, ' ', s)
end.