AtCoder Beginner Contest 336 A题解

Problem Statement

For a positive integer �X, the Dragon String of level �X is a string of length (�+3)(X+3) formed by one L, �X occurrences of o, one n, and one g arranged in this order.

You are given a positive integer �N. Print the Dragon String of level �N.
Note that uppercase and lowercase letters are distinguished.

Constraints

  • 1≤�≤20241≤N≤2024
  • �N is an integer.

Input

The input is given from Standard Input in the following format:

�N

Output

Print the Dragon String of level �N.


Sample Input 1Copy

Copy

3

Sample Output 1Copy

Copy

Looong

Arranging one L, three os, one n, and one g in this order yields Looong.


Sample Input 2Copy

Copy

1

Sample Output 2Copy

Copy

Long

太水了

#include
using namespace std;
int main(){
  int a;
  cin>>a;
  cout<<"L";
  for(int i=1;i<=a;i++){
    cout<<"o";
  }
  cout<<"ng";
  return 0;
}

你可能感兴趣的:(c++)