As a newbie programmer

Three's Company @ Dcoder

Dcoder icon

Problem: This problem requires you to create a output string from input string such that for every character in input string, there are three same characters in output string.

Input: First line contains N, the number of letters in the string.

The next line contains the string.

Output: Print the output_string.

Constraints: 1 ≤ N ≤ 20

Sample Input: 5

Hello

Sample Output: 

HHHeeellllllooo

input()
for s in input():
  print(s*3, end='')

How do you rate this article?

1


Lochard
Lochard

20240228 Arrived in the UK for about 2 week. All my fears persist. Some are even getting worse. https://github.com/locharp/asylum_diary/


As a newbie programmer
As a newbie programmer

Sharing entry level codes. My snippets on GitHub https://github.com/locharp/code-snippets

Publish0x Publish0x

Reward the author with $0.01 in crypto, and earn yourself as you read!

20% to author / 80% to me.
Rewards are FREE. Publish0x pays them, not you.

Page not displaying correctly?