5 solutions

  • 1
    @ 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;
    

    }

    • 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; }

          • 0
            @ 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
            98
            Accepted
            48
            Uploaded By