- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
- 33
- 34
- 35
- 36
- 37
- 38
- 39
- 40
- 41
- 42
- 43
- 44
- 45
- 46
- 47
- 48
- 49
- 50
- 51
- 52
- 53
- 54
var
s:string;
function f(s:string):string;
var
i:integer;
s1:string;
begin
s1:=#13#10's:=''';
for i:=1to length(s)do begin
if s[i]=#13then
s1:=s1+'''#13#10+'#13#10+''''
else if s[i]=''''then
s1:=s1+''''''
else if s[i]<>#10 then
s1:=s1+s[i];
f:=s1+''';'#13#10+
's:=s+f(s);'#13#10+
'write(s);'#13#10+
'close(output);'#13#10+
'end.';
end;
end;
begin
assign(output,'s.txt');
rewrite(output);
s:='var'#13#10+
's:string;'#13#10+
'function f(s:string):string;'#13#10+
'var'#13#10+
'i:integer;'#13#10+
's1:string;'#13#10+
'begin'#13#10+
's1:=#13#10''s:='''''';'#13#10+
'for i:=1to length(s)do begin'#13#10+
'if s[i]=#13then'#13#10+
's1:=s1+''''''#13#10+''#13#10+'''''''''#13#10+
'else if s[i]=''''''''then'#13#10+
's1:=s1+'''''''''''''#13#10+
'else if s[i]<>#10 then'#13#10+
's1:=s1+s[i];'#13#10+
'f:=s1+'''''';''#13#10+'#13#10+
'''s:=s+f(s);''#13#10+'#13#10+
'''write(s);''#13#10+'#13#10+
'''close(output);''#13#10+'#13#10+
'''end.'';'#13#10+
'end;'#13#10+
'end;'#13#10+
'begin'#13#10+
'assign(output,''s.txt'');'#13#10+
'rewrite(output);';
s:=s+f(s);
write(s);
close(output);
end.
istem 23.10.2010 23:10 # +9
bugmenot 24.10.2010 18:21 # +3
3.14159265 25.10.2010 16:09 # +1
говно же, я когда на паскале квайн делал, то скобки объявлял через chr()
Arigato 17.11.2010 18:09 # −1