AtCoder Toyota Programming Contest 2023#8(AtCoder Beginner Contest 333)A题解

发布时间:2023年12月17日

A - Three Threes?Editorial


Time Limit: 2 sec / Memory Limit: 1024 MB

Score :?points100100

Problem Statement

You are given an integer?between?and?, inclusive, as input.�N1199

Concatenate?copies of the digit?and print the resulting string.�NN

Constraints

  • N?is an integer between?and?, inclusive.1199

Input

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

N

Output

Print the answer.


Sample Input 1Copy

Copy
3

Sample Output 1Copy

Copy
333

Concatenate three copies of the digit?to yield the string?.33333


Sample Input 2Copy

Copy
9

Sample Output 2Copy

Copy
999999999

水水水

#include<iostream>
using namespace std;
#pragma GCC optimize(2)
int main(){
  int n;
  cin>>n;
  for(int i=0;i<n;i++){
    cout<<n;
  }
  return 0;
}

文章来源:https://blog.csdn.net/2301_76204446/article/details/135045101
本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。