diff options
Diffstat (limited to 'others/volume1/059.pas')
-rw-r--r-- | others/volume1/059.pas | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/others/volume1/059.pas b/others/volume1/059.pas new file mode 100644 index 0000000..61095ab --- /dev/null +++ b/others/volume1/059.pas @@ -0,0 +1,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. |