AtCoder Toyota Programming Contest 2023#8(AtCoder Beginner Contest 333)A题解
2023-12-17 16:29:44
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.�N�N
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
本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。 如若内容造成侵权/违法违规/事实不符,请联系我的编程经验分享网邮箱:veading@qq.com进行投诉反馈,一经查实,立即删除!
本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。 如若内容造成侵权/违法违规/事实不符,请联系我的编程经验分享网邮箱:veading@qq.com进行投诉反馈,一经查实,立即删除!