1 solutions

  • 2
    @ 2025-6-7 9:19:07

    Peter is Strong!!!

    Tymon is Strong!!!

    Nathan is Strong!!!

    Adam is the strongest!!!!!

      #include<iostream>
    #include<string.h>
    using namespace std;
    int main()
    {
    	int n;
    	cin >> n;
    	string a[n+1];
    	for(int i=1;i<=n;i++)
    	{
    		cin >> a[i];
    	 } 
    	for(int i=1;i<=n;i++)
    	{
    		for(int j=1;j<=a[i].length();j++)
    		{
    			if(a[i][j]>='A' && a[i][j]<='Z')
    			{
    				a[i][j]+=('a'-'A');
    			}
    		}
    		if(a[i][0]>='a' && a[i][0] <= 'z' )
    		{
    			a[i][0]=a[i][0]-32;
    		}
    	}
    	for(int i=1;i<=n;i++)
    	{
    		cout << a[i] << endl;
    	 } 
     }
     
    
    

    Information

    ID
    1926
    Time
    1000ms
    Memory
    256MiB
    Difficulty
    6
    Tags
    # Submissions
    54
    Accepted
    19
    Uploaded By