oj mrJudge
Toggle navigation
  • Login
    • Forget Password
      Login
User Image

Hello, Stranger

Guest
  • Analysis Mode
  • Problems
    • All Problems
    • Latest Problems
  • Join Us Now
  • Registration
  • Contact Us
  • Infomation
  • About
    • Terms of Use
    • Technical Specifications
    • Credits

parallelogram Batch , stdin/stdout

Registered Users Only

Please login to utilize this feature.

Do note that this website only supports submissions in C++.

parallelogram.html

Mr A wants to see a string of characters again and again, but doesn't want it to look as boring as a single straight column.

Write a program to help Mr A see a slanted column of characters.

Input

First line contains a number 0 < n ≤ 100 representing the height of the slanted column

Second line contains a string s. You may assume that the string does not contain any special characters or spaces and has less than or equal to 100 characters.

Output

The string s repeated n times on n lines, but with line i having i-1 spaces in front.

Sample Input 1

5
abcabc

Sample Output 1

abcabc
 abcabc
  abcabc
   abcabc
    abcabc

Tags

String Processing

Subtasks and Limits

Subtask Score #TC Time Memory Scoring
1100101s32MBAverage
2011s32MBAverage

Judge Compile Command

g++-8 ans.cpp -o parallelogram -Wall -Wshadow -static -O2 -lm -m64 -s -w -std=gnu++17 -fmax-errors=512

Accepted Submissions

subIDUserTimeMax Time

Past Submissions

subIDUserTimeScore
mrJudge 09.05.20
Copyright © 2020 mrJudge. All rights reserved.