题解 | #复制输出#

复制输出

https://ac.nowcoder.com/acm/problem/22224

字符串长度并未给出,因此不考虑使用 char 数组和 gets(),更何况后者在 C++11 中已经被移除。

#include<bits/stdc++.h>
using namespace std;
int main(){
    char s=getchar();
    while(s!=EOF){
        putchar(s);
        s=getchar();
    }
    return 0;
}
全部评论

相关推荐

09-01 17:26
已编辑
门头沟学院
点赞 评论 收藏
分享
评论
2
收藏
分享

创作者周榜

更多
牛客网
牛客网在线编程
牛客网题解
牛客企业服务