7 条题解

  • 5
    @ 2024-10-18 22:44:54

    思路

    未告知共有多少组数据,使用while循环。

    题解

    #include <iostream>
    #include <cstdio>
    using namespace std;
    int main()
    {
      int a,b;
    	while(cin>>a>>b)
    	{
    		cout<<a+b<<endl;
    	}
    	return 0;
     } 
    
    
    • 3
      @ 2024-10-15 21:36:16

      juruo的第一篇题解(虽然纯水题

      这个题因为没有告诉你多少组数据所以要用while cin
      AC代码:

      #include<bits/stdc++.h>
      using namespace std;
      int a,b;
      int main()
      {
      	while(cin>>a>>b)
      	{
      		cout<<a+b<<endl;
      	}
      	return 0;
       } 
      
      • 1
        @ 2024-11-28 15:46:01

        #include #include using namespace std; int main() { int a,b; while(cin>>a>>b) { cout<<a+b<<endl; } return 0; }

        • 1
          @ 2024-11-28 15:42:18

          酷酷酷酷酷酷酷酷酷

          • 1
            @ 2024-11-13 20:55:36

            #include #include using namespace std; int main() { int a,b; while(cin>>a>>b) { cout<<a+b<<endl; } return 0; }

            • 1
              @ 2024-11-13 20:55:08

              #include #include using namespace std;

              int main() { int n; cin >> n; if(n>0) { cout<<"Yes"; } else { cout<<"No"; } return 0; }

              • -3
                @ 2024-10-21 21:43:58
                #include<bits/stdc++.h>
                using namespace std;
                int main(){
                    int a,b;
                	while(cin>>a>>b)
                		cout<<a+b<<endl;
                	return 0;
                } 
                
                • 1

                信息

                ID
                2
                时间
                1000ms
                内存
                32MiB
                难度
                7
                标签
                递交数
                112
                已通过
                30
                上传者