国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁(yè) > 學(xué)院 > 開發(fā)設(shè)計(jì) > 正文

字符串的展開

2019-11-08 02:33:57
字體:
供稿:網(wǎng)友
var p1,p2,p3,i,j,n,l:longint; ic,k:char; s,ss,s2:ansistring; function check(c,cc:char):boolean; var biao:longint; begin  biao:=0;  if ((c in['a'..'z'])and(cc in['a'..'z']))or((c in['0'..'9'])and(cc in['0'..'9'])) then biao:=1;  if (ord(cc)-ord(c)>1)and(c<>'-')and(cc<>'-')and(biao=1) then exit(true);  exit(false); end; function down(s:ansistring):ansistring; var i1,j1:longint; begin  down:='';  for i1:=length(s) downto 1 do  down:=down+s[i1];  exit(down); end;begin readln(p1,p2,p3); readln(s); write(s[1]); for i:=2 to length(s)-1 do  if s[i]='-' then  begin   ss:='';   if (not check(s[i-1],s[i+1]))and(ord(s[i+1])-ord(s[i-1])<>1) then write('-')   else   if check(s[i-1],s[i+1]) then    begin    if p1=1 then    begin     for ic:=chr(ord(s[i-1])+1)to chr(ord(s[i+1])-1) do      for j:=1 to p2 do      ss:=ss+ic;    end;    if p1=2 then    begin     for ic:=chr(ord(s[i-1])+1)to chr(ord(s[i+1])-1) do      for j:=1 to p2 do      ss:=ss+upcase(ic);    end;    if p1=3 then    begin     for ic:=chr(ord(s[i-1])+1)to chr(ord(s[i+1])-1) do      for j:=1 to p2 do      ss:=ss+'*';    end;    if p3=1 then write(ss)            else write(down(ss));  end; end else write(s[i]); write(s[length(s)]);end.
發(fā)表評(píng)論 共有條評(píng)論
用戶名: 密碼:
驗(yàn)證碼: 匿名發(fā)表
主站蜘蛛池模板: 南澳县| 沧州市| 弥勒县| 苍溪县| 浦江县| 凤山市| 阿克陶县| 红河县| 汉沽区| 上高县| 黄石市| 宕昌县| 南投市| 津南区| 门源| 共和县| 融水| 微山县| 错那县| 德州市| 安吉县| 河间市| 上饶县| 大厂| 邹城市| 黑山县| 太原市| 尼木县| 石家庄市| 阜南县| 汝城县| 西城区| 马边| 武穴市| 开封市| 商都县| 云南省| 海丰县| 清丰县| 贵州省| 健康|