7 solutions

  • 2
    @ 2026-7-14 10:29:56

    #include<bits/stdc++.h> using namespace std; int main(){

    int	a,b,sa=0,sb=0;
    for(int i=1;i<=9;i++){
    	cin>>a;
    	sa+=a;
    } 
    for(int i=1;i<=8;i++){
    	cin>>b;
    	sb+=b;
    } 
    cout<<sa-sb+1;
    
    return 0;
    

    }

    • 1
      @ 2026-8-13 16:20:12

      史上最硬核方法

      #include<bits/stdc++.h>
      using namespace std;
      int main()
      {
          int a1,a2,a3,a4,a5,a6,a7,a8,a9;
      	cin>>a1>>a2>>a3>>a4>>a5>>a6>>a7>>a8>>a9;
      	int b1,b2,b3,b4,b5,b6,b7,b8;
      	cin>>b1>>b2>>b3>>b4>>b5>>b6>>b7>>b8;
      	int i=a1+a2+a3+a4+a5+a6+a7+a8+a9;
      	int j=b1+b2+b3+b4+b5+b6+b7+b8;
      	cout<<i-j+1;
      	return 0; 
      }
      
      • 0
        @ 2026-8-3 11:53:57
        #include<bits/stdc++.h>
        using namespace std;
        int main(){
            int A1,A2,A3,A4,A5,A6,A7,A8,A9,B1,B2,B3,B4,B5,B6,B7,B8;
            cin>>A1>>A2>>A3>>A4>>A5>>A6>>A7>>A8>>A9>>B1>>B2>>B3>>B4>>B5>>B6>>B7>>B8;
            cout<<A1+A2+A3+A4+A5+A6+A7+A8+A9-B1-B2-B3-B4-B5-B6-B7-B8+1;
            return 0;
        }
        
        • 0
          @ 2026-4-13 21:11:47

          #include<bits/stdc++.h> using namespace std; int main() { int a,b,c,d,e,f,g,h,i; cin>>a>>b>>c>>d>>e>>f>>g>>h>>i; int j,k,l,m,n,o,p,q; cin>>j>>k>>l>>m>>n>>o>>p>>q; int z=a+b+c+d+e+f+g+h+i; int x=j+k+l+m+n+o+p+q; if(z<x) { cout<<"0"; } else if(z==x) { cout<<"1"; } else if(z>x) { int m=z-x+1; cout<<m; } return 0; }

          • 0
            @ 2026-4-13 21:11:21

            #include<bits/stdc++.h> using namespace std; int main() { int a,b,c,d,e,f,g,h,i; cin>>a>>b>>c>>d>>e>>f>>g>>h>>i; int j,k,l,m,n,o,p,q; cin>>j>>k>>l>>m>>n>>o>>p>>q; int z=a+b+c+d+e+f+g+h+i; int x=j+k+l+m+n+o+p+q; if(z<x) { cout<<"0"; } else if(z==x) { cout<<"1"; } else if(z>x) { int m=z-x+1; cout<<m; } return 0; }

            • 0
              @ 2026-4-13 21:10:23

              #include<bits/stdc++.h> using namespace std; int main() { int a,b,c,d,e,f,g,h,i; cin>>a>>b>>c>>d>>e>>f>>g>>h>>i; int j,k,l,m,n,o,p,q; cin>>j>>k>>l>>m>>n>>o>>p>>q; int z=a+b+c+d+e+f+g+h+i; int x=j+k+l+m+n+o+p+q; if(z<x) { cout<<"0"; } else if(z==x) { cout<<"1"; } else if(z>x) { int m=z-x+1; cout<<m; } return 0; }

              • -1
                @ 2026-2-4 14:09:36

                #include<bits/stdc++.h> using namespace std; int main() { int n,n1,n2,n3,n4,n5,n6,n7,n8; cin>>n>>n1>>n2>>n3>>n4>>n5>>n6>>n7>>n8; int g,g1,g2,g3,g4,g5,g6,g7; cin>>g>>g1>>g2>>g3>>g4>>g5>>g6>>g7; int j=n+n1+n2+n3+n4+n5+n6+n7+n8; int h=g+g1+g2+g3+g4+g5+g6+g7; //h+g8-j=1; int g8=j+1-h; cout<<g8; return 0; } | |

                      • | Column | | | | | | | - | - | - | - | - | - | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - | - | - | - | - | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - | - | - | - | | | | | | | | | | | | | | | | | | | | |
                • 1

                Information

                ID
                2345
                Time
                1000ms
                Memory
                256MiB
                Difficulty
                1
                Tags
                (None)
                # Submissions
                111
                Accepted
                56
                Uploaded By