我又来讲解题目啦
第一题
简简单单,所以我把程序写的快了一些
- 如果长度为1 → 输出6遍
- 如果长度为2 → 输出3遍
- 如果长度为3 → 输出2遍
代码
#include<bits/stdc++.h>
using namespace std;
string s;
int main(){
cin>>s;
if(s.size()==1) cout<<s+s+s+s+s+s;
if(s.size()==2) cout<<s+s+s;
if(s.size()==3) cout<<s+s;
return 0;
}