blob: 61095ab3eb55d755498896398c82ad44efdd2913 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
uses clib;
var
n: int16;
a, s: int64;
begin
s := 0;
readln(n);
repeat
read(a);
if isprime(a) then
s := s + a;
dec(n)
until n = 0;
writeln(s)
end.
|