1 solutions

  • 0
    @ 2024-12-20 22:52:19

    C++ :

    #include<iostream>
    #include<cstdio>
    #include<cstring>
    #include<cctype> 
    using namespace std;
    int a[30];
    int main()
    {
    	char ch;
    	cin>>ch;
    	while(ch!='@')
    	{
    		if (isalpha(ch)) a[tolower(ch)-'a']++;
    		cin>>ch;
    	}
    	for (ch='a';ch<='z';ch=ch+1)
    		if (a[ch-'a'])
    			cout<<ch<<' '<<a[ch-'a']<<endl;
    	return 0;
    }
    
    

    Information

    ID
    795
    Time
    1000ms
    Memory
    128MiB
    Difficulty
    10
    Tags
    # Submissions
    2
    Accepted
    2
    Uploaded By