31 条题解

  • 0
    @ 2023-5-20 22:41:48

    编程起点——输出Hello world!

    题意:

    无输入,仅输出“Hello world!”

    思路:

    初始化 → 输出 → 程序结束

    参考代码:

    
    #include <iostream>  //导入输入输出库
    using namespace std;  //使用标准名称定义
    int main()  //主函数,注意:主函数必须命名为“main”,不然不会自动执行!
    {
        cout << "Hello world!" << endl;  //输出,cout表示输出,endl表示换行
        return 0;  //程序结束,“return 0”可以不加
    }
    
    
    • 0
      @ 2023-5-20 17:21:01

      一切编程语言梦的开始——Hello world

      思路:

      初始化设置→定义主函数→输出文字

      代码:

      #include <iostream>
      using namespace std;//初始设置
      int main()//定义主函数
      {
          cout << "Hello,World!";//输出
          return 0;
      }
      
      • 0
        @ 2023-5-19 10:45:06

        这是大家编程的起点——hello world

        解析:

        无输入,输出hello world

        参考代码:

        #include <iostream>
        using namespace std;
        int main()
        {
            cout << "hello world";
            return 0;
        }
        
        • -1
          @ 2024-6-7 21:03:24

          把代码写到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;
          }
          
          • -1
            @ 2024-5-19 9:50:34

            这是一个题解 c++

            #include <bits/stdc++.h>  //hetao4040809
            using namespace std;
            int main()
            {
                cout<<"Hello,World!";
                return 0;
            }
            
            • -1
              @ 2024-4-12 20:20:07
              #include<bits/stdc++.h>
              int main(){
                  std::cout<<"Hello,World!";
                  return 0;
              }
              全网最短代码,已AC。
              
              • -1
                @ 2024-3-24 14:35:16

                Hello World

                起点

                解析 无输入,要我们输出,所以不用设置变量 输出的代码是cout 所以综合来讲就是cout << "Hello,World";

                #include <bits/stdc++.h>
                using namespace std;
                int main()
                {
                    cout << "hello world";
                    return 0;
                }
                
                • -1
                  @ 2023-12-18 15:10:05
                  #include <bits/stdc++.h> 
                  using namespace std;
                  #define ll long long
                  int main(){
                      cout<<"Hello,World!";
                      return 0;
                  }
                  
                  • -1
                    @ 2023-10-20 19:36:01
                    #include <bits/stdc++.h>
                    using namespace std;
                    signed main()
                    {
                        printf("Hello World");
                        return 0;
                    }
                    

                    C风格代码

                    • -1
                      @ 2023-10-20 19:34:46

                      Hello World!

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

                      信息

                      ID
                      72
                      时间
                      1000ms
                      内存
                      128MiB
                      难度
                      7
                      标签
                      递交数
                      17260
                      已通过
                      4499
                      上传者