Advertisement
saira12tabassum19

Untitled

Oct 4th, 2019
132
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.60 KB | None | 0 0
  1. #include<bits/stdc++.h>
  2. using namespace std;
  3. int main()
  4. {
  5. int t;
  6. cin>>t;
  7. for(int i=0;i<t;i++)
  8. {
  9. string a,b; int l_a,l_b,k=0;
  10. cin>>a>>b;
  11. l_a=a.size(); l_b=b.size();
  12. while(a[k]=='0')
  13. a.erase(a.begin());
  14. while(b[k]=='0')
  15. b.erase(b.begin());
  16.  
  17. if(l_a>l_b)cout<<"Case "<<i+1<<": A"<<endl;
  18. else if(l_a<l_b)cout<<"Case "<<i+1<<": B"<<endl;
  19. else if(l_a==l_b)
  20. {
  21. if(a>b)cout<<"Case "<<i+1<<": A"<<endl;
  22. else if(a<b)cout<<"Case "<<i+1<<": B"<<endl;
  23. else if(a==b)cout<<"Case "<<i+1<<": Same"<<endl;
  24. }
  25.  
  26. }
  27.  
  28.  
  29.  
  30. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement