about summary refs log tree commit diff
path: root/others/volume1/054.pas
blob: ad29f4de747416167734ffd4180a39b22b107aa8 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
uses clib;

var
  n, c: int16;
  a: int32;
  s: int64 = 0;

begin
  readln(n);
  c := 0;
  repeat
    read(a);
    if issquare(a) then
      begin
        inc(c);
        s := s + a
      end;
    dec(n)
  until n = 0;
  writeln(c, ' ', s)
end.