跳到正文

题解

B2002 题解

ZhaiOverflow约 1 分钟
原文
文章信息与版本

文章信息

发布
2021年7月3日
收录
2026年11月29日
更新
2026年11月29日
篇幅
约 1 分钟
获赞
16
题目
B2002

版本

  1. v1当前

题意

输出一个字符串”Hello,World!”。

分析

可以直接使用输出流进行字符串输出,无需保存。

代码如下

C++
#include<bits/stdc++.h>
using namespace std;
int main() {
	cout << "Hello,World!" << endl;
	return 0;
}
原文
抓取于
  1. chenhw

    #include<bits/stdc++.h> using namespace std; int main(){ string a="Hello,World!"; cout<<a; return 0; }

  2. llb12345

    好难啊!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

  3. zhaozihan2026

    很经典呢

  4. __erinww

    好难

  5. cuiyoucan

    是会编程的人眼里最简单且经典の题

  6. cccz

    这个“太难了”

  7. 39T9

    #include<iostream> using namespace std; int main() { cout<<"Hello,World!"<<endl;//<<endl; return 0; } //有手就可以

  8. lanmengfei

    string a[4]={"Hello",",","World","!"};for (int i=0;i<4;i++) cout<<a[i];return 0;//“新手代码”

  9. ZhaiOverflow

    @kernel12138 看看是不是你的字符大小写有问题(还有中英文符号

  10. kernel12138

    为什么python不能直接用print(“hello,world!”)明明运行是正常的