Toggle navigation
Home
Latest pastes
FAQ
Random
BitBin is shutting down!
Register
Login
PTIT121I
SUBMITTED BY:
Guest
DATE:
Feb. 16, 2014, 1:22 p.m.
FORMAT:
C++
SIZE:
865 Bytes
Raw
Download
Tweet
HITS:
1199
Go to comments
Report
//Haha TTpro
//spoj PTIT121I
//http://www.spoj.com/PTIT/problems/PTIT121I/
#include
<iostream>
#include
<cstring>
using
namespace
std
;
void
input
(
int
&
n
,
char
a
[]);
void
ghira
(
int
n
,
char
a
[]
);
int
main
()
{
char
*
a
;
int
n
;
int
t
;
cin
>>
t
;
for
(
int
i
=
1
;
i
<=
t
;
i
++
)
{
a
=
new
char
[
25
];
input
(
n
,
a
);
cout
<<
i
<<
" "
;
ghira
(
n
,
a
);
delete
[]
a
;
}
}
void
input
(
int
&
n
,
char
a
[])
{
int
b
;
cin
>>
b
;
//kill so thu tu
cin
>>
n
;
cin
.
getline
(
a
,
100
);
}
void
ghira
(
int
n
,
char
a
[]
)
{
int
i
,
j
;
int
x
;
x
=
strlen
(
a
);
for
(
i
=
1
;
i
<
x
;
i
++
)
{
for
(
j
=
1
;
j
<=
n
;
j
++
)
{
cout
<<
a
[
i
];
}
}
cout
<<
endl
;
}
Please enable JavaScript to view the
comments powered by Disqus.
comments powered by
Disqus