Advertisement
Varvara_Golovnova

Untitled

Dec 7th, 2024
12
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.20 KB | None | 0 0
  1. var
  2. a : array [1..100] of longint;
  3. n,sum,i : longint;
  4. begin
  5. readln(n);
  6. for i:=1 to n do readln(a[i]);
  7. sum:=0;
  8. for i:=1 to n do sum:=sum+a[i];
  9. writeln(sum);
  10. writeln(sum-n);
  11. end.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement