Chef and Table Tennis

#include <bits/stdc++.h> using namespace std; int main () { int x; cin>>x; for(int i=0;i<x;i++) { string a; int a1=0,b1=0; cin>>a; for(int j=0;j<a.length();j++){ if(a[j]=='1'){ a1++; } else{ b1++; } } if(a1>b1) cout<<"WIN"<<endl; else cout<<"LOSE"<<endl; } }

Be the first to comment

You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.