Untitled
unknown
plain_text
3 years ago
789 B
6
Indexable
Never
#include <bits/stdc++.h> using namespace std; int main() { #ifndef ONLINE_JUDGE freopen("input.txt", "r", stdin); freopen("output.txt", "w", stdout); #endif // ONLINE_JUDGE string s; cin>>s; int upper = 0, lower = 0; for (int i = 0; i < s.length(); ++i) { if(s[i]>='A' && s[i]<='Z') upper++; else lower++; } if(upper>lower) { for (int i = 0; i < s.length(); ++i) if (s[i]>='a') s[i]=s[i]-32; } else { for (int i = 0; i < s.length(); ++i) { if (s[i]<='Z') { s[i]=s[i]+32; } } } cout<<s<<endl; return 0; }