var s,t:string;
i,j,k,x,code,n:longint;
procedure nhap;
begin
readln(s);
n:=length(s);
end;
procedure xuat(x:longint;c:char); //xuat x ki tu c lien tiep
begin
for i:=1 to x do write(c);
end;
function xau_to_so(t:string):longint;
var res,x:longint;
begin
res:=0;
for i:=1 to length(t) do
begin
x:=ord(t[i])-48;
res:=res*10+x;
end;
exit(res);
end;
procedure giai;
var i:longint;
begin
t:='';
for i:=1 to n do
begin
if ('0'<=s[i]) and (s[i]<='9') then
t:=t+s[i]
else
if (t<>'') then
begin
x:=xau_to_so(t);
xuat(x,s[i]);
t:='';
end
else write(s[i]);
end;
end;
begin
assign(input,'gnen.inp');reset(input);
assign(output,'gnen.out');rewrite(output);
nhap;
giai;
end.
* Chuyên dạy lập trình ONLINE cho học sinh THCS, THPT *.
Mọi giao lưu, trao đổi, xin liên hệ: Lê Quang Vinh - zalo: 037.803.8755.
Page: Lớp học Code Sky
Group FB1: Ôn thi HSG9 - THTB - TS10 chuyên tin
Group FB2: Học Scratch - Ôn thi Tin học trẻ bảng A
Thứ Hai, 9 tháng 5, 2022
GNEN PASCAL
Đăng ký:
Đăng Nhận xét (Atom)
Không có nhận xét nào:
Đăng nhận xét
Lưu ý: Chỉ thành viên của blog này mới được đăng nhận xét.