Codeforces-SolutionsA/59A Word/59A.cpp

30 lines
486 B
C++
Raw Normal View History

2023-06-08 21:02:15 +08:00
#include<bits/stdc++.h>
using namespace std;
int main()
{
int i,len,uppercase=0,lowercase=0;
2023-06-08 21:14:23 +08:00
char s[1000];
2023-06-08 21:02:15 +08:00
cin>>s;
len=strlen(s);
for(i=0;i<len;i++)
{
if(islower(s[i])) lowercase++;
else uppercase++;
}
if(lowercase<uppercase)
{
for(i=0;i<len;i++)
{
s[i]=toupper(s[i]);
}
}
else
{
for(i=0;i<len;i++)
{
s[i]=tolower(s[i]);
}
}
cout<<s<<endl;
}