Advertisement
Dennnhhhickk

Untitled

Nov 29th, 2016
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.35 KB | None | 0 0
  1. for i := 2 to n do
  2. begin
  3. a[i] := a[i - 1] * 5;
  4. for j := i div 5 to i - 1 do
  5. begin
  6. if (a[j] * 2 > a[i - 1]) and (a[j] * 2 < a[i]) then
  7. a[i] := a[j] * 2;
  8. if (a[j] * 3 > a[i - 1]) and (a[j] * 3 < a[i]) then
  9. a[i] := a[j] * 3;
  10. if (a[j] * 5 > a[i - 1]) and (a[j] * 5 < a[i]) then
  11. a[i] := a[j] * 5;
  12. end;
  13. end;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement