1 solutions

  • 0
    @ 2026-7-7 10:26:03
    #include<bits/stdc++.h>
    using namespace std;
    int main()
    {
    	string s;
    	cin>>s;
    	int cnt=0;
    	int n=s.size();
    	bool st=true;
    	for(int i=1;i<n;i++)
    	{
    		if(s[i]>='A'&&s[i]<='Z')
    		{
    			st=false;	
    		}	
    	} 
    	if(st&&s[0]>='A'&&s[0]<='Z')
    	{
    		cout<<"Yes";
    	}
    	else
    	{
    		cout<<"No";
    	}
    	return 0;
    }
    
    
    • 1

    Information

    ID
    2410
    Time
    1000ms
    Memory
    256MiB
    Difficulty
    1
    Tags
    (None)
    # Submissions
    97
    Accepted
    24
    Uploaded By