fork download
  1. program qq;
  2. var max,count,i: integer;
  3. begin
  4. count:= 0;
  5. max:=0;
  6. for i:= 4197 to 9182 do
  7. begin
  8. if (i mod 5 = 0) and
  9. (i mod 6 <> 0) and
  10. (i mod 10 <> 0) and
  11. (i mod 13 <> 0) and
  12. (i mod 16 <> 0) then
  13. begin
  14. count+=1;
  15. if i > max then
  16. max:= i;
  17. end;
  18. end;
  19. writeln(count,' ', max)
  20. end.
Success #stdin #stdout 0s 5504KB
stdin
Standard input is empty
stdout
459 9175