Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- program task1simple;
- var n,i,j,k:integer;
- a: array[1..1000] of integer;
- begin
- readln(N);
- for i := 1 to N do
- read(a[i]);
- for i := 1 to N-1 do
- begin
- for j:=i+1 to N do
- if ((a[i] +a[j])mod 2 <> 0) and ((a[i]*a[j]) mod 5 = 0) then k := k+1;
- end;
- write(k);
- end.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement