首页
比赛
题库
课程
竞赛讨论区
登录
/
注册
去牛客
首页
>
复制输出
11条解析
开通博客写题解
Ayx03
发表于 2022-03-19 17:31:25
字符串长度并未给出,因此不考虑使用 char 数组和 gets(),更何况后者在 C++11 中已经被移除。 #include<bits/stdc++.h> using namespace std; int main(){ char s=getchar(); while(
展开全文
霸气灬钦哥
发表于 2020-07-25 10:10:09
#include<iostream> #include<cstring> using namespace std; int main() { string s; getline(cin,s); cout<<s<<endl; }分
展开全文
吴桐宇
发表于 2023-01-31 13:32:00
今天我们来挑战python一行题解!!!! print(input()) 撒花~结束 是不是很简单!!
潍坊鲨鱼公园儿童大学
发表于 2021-01-26 16:38:48
#include <iostream> #include <string> using namespace std; int main() { string str; getline(cin, str); cout << str;
展开全文
牛客216979817号
发表于 2025-06-03 07:57:14
import java.util.Scanner; public class Main{ public static void main(String []args){
展开全文
我儿雷俊有大帝之资
发表于 2024-11-10 15:02:16
#include <stdio.h> int main(){ char c; while((c=getchar())!='\n'){ printf ("%c",c);} ret
展开全文
牛客517072235号
发表于 2021-08-01 19:24:54
#include<iostream> #include<string> using namespace std; int main() { string a; getline(cin,a); cout<<a; return 0; }
展开全文
阿八阿八
发表于 2022-02-27 15:20:50
#include<stdio.h> #include<string.h> int main() { int i,j; char str[1000]; &nb
展开全文
Tender^
发表于 2021-10-02 23:58:13
#include<bits/stdc++.h> using namespace std; int main(){ char a; a=getchar(); while(a!='\n'){ cout<<a; a=getch
展开全文
23数二杨帆
发表于 2023-11-02 11:15:39
#include <bits/stdc++.h> using namespace std; int main() { string str; getline(cin , str); cout << str; return 0; }
查看本题
查看本题讨论
相关比赛
18143-阿尔法NOIP集训营-Day1
进入比赛
18160-阿尔法-C++CSP训练(2星)
进入比赛
18388-暑假第一周Java基础训练
进入比赛
19467-阿尔法C++暑期日常训练
进入比赛
20957-实验室纳新内推热身赛
进入比赛
等你来战
查看全部
牛客小白月赛118
报名截止时间:2025-06-13 21:00
牛客周赛 Round 96
报名截止时间:2025-06-15 21:00
牛客练习赛141
报名截止时间:2025-06-20 21:30
牛客周赛 Round 97
报名截止时间:2025-06-22 21:00
第五届上海理工大学程序设计全国挑战赛
报名截止时间:2025-06-29 17:30
2025牛客暑期多校训练营1
报名截止时间:2025-07-15 17:00
2025牛客暑期多校训练营2
报名截止时间:2025-07-17 17:00
扫描二维码,关注牛客
意见反馈
下载牛客APP,随时随地刷题