fork(1) download
  1. program ideone;
  2. var a, n, i, mx: integer; {от -32767 до 32768}
  3. begin
  4. mx := -32767;
  5. read(n);
  6.  
  7. for i:= 1 to n do
  8. begin
  9. readln(a);
  10. if (mx < a) and (a mod 5 = 0) then
  11. mx := a;
  12. end;
  13.  
  14. writeln(mx);
  15. end.
Success #stdin #stdout 0s 5316KB
stdin
8
26
12
-10
47
25
-100
22
10

15
stdout
25