14640: I miss you...发表时间:2022-10-27 20:10 14640: I miss you...时间限制: 1 Sec 内存限制: 128 MB 题目描述Given is a string S. Replace every character in S with x and print the result. 输入Input is given from Standard Input in the following format: 输出Replace every character in S with x and print the result. 样例输入 Copy【样例1】 sardine 【样例2】 xxxx 【样例3】 gone 样例输出 Copy【样例1】 xxxxxxx 【样例2】 xxxx 【样例3】 xxxx 提示样例1解释 #include<bits/stdc++.h> using namespace std; int main(){ char s[105];cin>>s; int len=strlen(s); for(int i=1;i<=len;i++) cout<<"x"; cout<<endl; return 0; } 上一篇2184: 投票统计
文章分类:
算法例题
|