about summary refs log tree commit diff
path: root/daily/285easy/2enc.pas
blob: 96e58c5d50bd53f848123e4039d3b811250c1ede (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
var
  fi, fo: text;
  n, i: cardinal;


begin
  assign(fi, 'part2.inp');
  assign(fo, 'part2.out');
  reset(fi);
  rewrite(fo);
  repeat
    repeat
      read(fi, n);
      for i := 1 to n div 255 do
        write(fo, 255, ' ');
      write(fo, n mod 255, ' ')
    until eoln(fi);
    writeln(fo)
  until eof(fi);
  close(fi);
  close(fo)
end.