8 条题解

  • 5
    @ 2022-2-19 10:58:57
    #include <stdio.h>
    #include <iostream>
    #include <string.h>
    const int N = 2e5 + 10;
    using namespace std;
    int main()
    {
        string a;
        getline(cin,a);
        int len = a.size();
        for (int i = 0; i < len; i++)
        {
            if (a[i] != ' ')
            {
                cout << a[i];         
            }
            else
            {
                cout << endl;
            }
        }
    }
    
    • 1
      @ 2025-5-5 11:50:44

      最简代码 #include < iostream > using namespace std; int main() { string a; while (cin>>a) cout<<a<<endl; return 0; }

      • 0
        @ 2023-3-31 16:47:23

        #include

        #include

        using namespace std;

        int main() {

        string s;

        getline(cin, s);

        for (int i = 0; i < s.length(); i++) {

        if (s[i] == ' ') cout << endl;

        else cout << s[i];

        }

        return 0;

        }

        • -1
          @ 2024-11-10 20:43:59
          • 最简代码 #include #include #include #include #include #include #include #include #include using namespace std; char a[100005]; bool flag=false; int main(){ while(cin>>a){ cout<<a<<endl; } return 0;

          }

          • -1
            @ 2024-11-10 20:42:29
              • 最简代码
            1. *[ #include #include using namespace std; char a[100005]; bool flag=false; int main(){ while(cin>>a){ cout<<a<<endl; } return 0;

            }

            • -1
              @ 2023-9-17 19:48:52
              #include <iostream>
              char a[2005];
              int main(){
              	while(std::cin>>a)
              		std::cout<<a<<'\n';
              }
              
              • -1
                @ 2023-3-31 20:17:32

                极简代码:

                #include <bits/stdc++.h>//直接使用万能头
                char a[10086];
                using namespace std;
                const int N = 1e5 + 10;
                const int INF = 0x3f3f3f3f;
                int main(){
                	while(cin >> a){
                		cout << a << endl;
                	}
                	return 0;
                	}
                
                • @ 2023-9-17 19:51:34

                  最简代码(别杠说全写一行的法子) 6行不输a+b问题好吧[doge]

                  #include <iostream>
                  char a[2005];
                  int main(){
                  	while(std::cin>>a)
                  		std::cout<<a<<'\n';
                  }
                  
              • -4
                @ 2021-11-10 20:14:01

                用Python写的话。。。 a=input().split() for i in a: print(i)

                • 1

                信息

                ID
                1114
                时间
                1000ms
                内存
                256MiB
                难度
                5
                标签
                递交数
                491
                已通过
                200
                上传者