31 条题解
-
0
编程起点——输出Hello world!
题意:
无输入,仅输出“Hello world!”
思路:
初始化 → 输出 → 程序结束
参考代码:
#include <iostream> //导入输入输出库 using namespace std; //使用标准名称定义 int main() //主函数,注意:主函数必须命名为“main”,不然不会自动执行! { cout << "Hello world!" << endl; //输出,cout表示输出,endl表示换行 return 0; //程序结束,“return 0”可以不加 }
-
-1
把代码写到64行,给个赞吧😄 (猜猜绿色部分是干什魔的)
#include <iostream> using namespace std; int main() { /*#include <iostream> #include <string> #include <stack> using namespace std; char c; stack<char> s; bool flag = 1; int main() { while (true) { cin >> c; if (c == '@') { break; } if (c == '(' || c == '[' || c == '{') { s.push(c); } if (c == ')') { if (s.top() == '(') s.pop(); else { flag = 0; break; } } if (c == ']') { if (s.top() == '[') s.pop(); else { flag = 0; break; } } if (c == '}') { if (s.top() == '{') s.pop(); else { flag = 0; break; } } } if (flag == 1 && s.size() == 0) cout << "YES"; else cout << "NO"; return 0; } */ cout << "Hello,World!"; return 0; }
信息
- ID
- 72
- 时间
- 1000ms
- 内存
- 128MiB
- 难度
- 7
- 标签
- 递交数
- 17260
- 已通过
- 4499
- 上传者