近来发现自己会忘记以前写过的题目和思想,在不想学习新知识的懒惰下,现总结一下旧的题吧.
题目描述:
这道超级简单的题目没有任何输入。
你只需要在一行中输出著名短句“Hello World!”就可以了。
说实话,第一次做pat的题看到这个题以为有坑,然而是真的这样,代码就和第一次写c一样
#include<cstdio>
#include<cstdlib>
#include<cmath>
#include<cstring>
#include<iostream>
#include<algorithm>
#include<queue>
#include<map>
#include<stack>
using namespace std;
typedef long long ll;
int main()
{
ios::sync_with_stdio(false);
cout<<"Hello World!"<<endl;
}
如上
ios::sync_with_stdio
是关闭同步,加快输入输出的速度,防止卡时间
cout<<"Hello World"<<endl;
是等同于
printf("Hello World!");