Language: C++

#include <cstdio>
#include <iostream>
using namespace std ;
typedef long long ll ;
string s ;
int N ;
ll m ,a ,r ,c , h ;
ll D [5];
int P [10]={0 ,0 ,0 ,0 ,0 ,0 ,1 ,1 ,1 ,2};
int Q [10]={1 ,1 ,1 ,2 ,2 ,3 ,2 ,2 ,3 ,3};
int R [10]={2 ,3 ,4 ,3 ,4 ,4 ,3 ,4 ,4 ,4};
int main ()
{
	scanf ("% d " ,& N );
	for ( int i =0; i < N ; i ++)
	{
		cin > > s ;
		if ( s [0]== ’ M ’) m ++;
		if ( s [0]== ’ A ’) a ++;
		if ( s [0]== ’ R ’) r ++;
		if ( s [0]== ’ C ’) c ++;
		if ( s [0]== ’ H ’) h ++;
	}
	D[0]= m , D[1]= a , D[2]= r , D[3]= c , D[4]= h ;
	ll res =0;
	for ( int d =0; d <10; d ++) {
		res += D [ P [ d ]]* D [ Q [ d ]]* D [ R [ d ]];
		printf ("% lld \ n " , res )
	}
}


Compiler output:
a.cc:18:30: error: extended character ’ is not valid in an identifier
   18 |                 if ( s [0]== ’ M ’) m ++;
      |                              ^
a.cc:18:34: error: extended character ’ is not valid in an identifier
   18 |                 if ( s [0]== ’ M ’) m ++;
      |                                  ^
a.cc:19:30: error: extended character ’ is not valid in an identifier
   19 |                 if ( s [0]== ’ A ’) a ++;
      |                              ^
a.cc:19:34: error: extended character ’ is not valid in an identifier
   19 |                 if ( s [0]== ’ A ’) a ++;
      |                                  ^
a.cc:20:30: error: extended character ’ is not valid in an identifier
   20 |                 if ( s [0]== ’ R ’) r ++;
      |                              ^
a.cc:20:34: error: extended character ’ is not valid in an identifier
   20 |                 if ( s [0]== ’ R ’) r ++;
      |                                  ^
a.cc:21:30: error: extended character ’ is not valid in an identifier
   21 |                 if ( s [0]== ’ C ’) c ++;
      |                              ^
a.cc:21:34: error: extended character ’ is not valid in an identifier
   21 |                 if ( s [0]== ’ C ’) c ++;
      |                                  ^
a.cc:22:30: error: extended character ’ is not valid in an identifier
   22 |                 if ( s [0]== ’ H ’) h ++;
      |                              ^
a.cc:22:34: error: extended character ’ is not valid in an identifier
   22 |                 if ( s [0]== ’ H ’) h ++;
      |                                  ^
a.cc: In function 'int main()':
a.cc:17:23: error: expected primary-expression before '>' token
   17 |                 cin > > s ;
      |                       ^
a.cc:18:30: error: '\U00002019' was not declared in this scope
   18 |                 if ( s [0]== ’ M ’) m ++;
      |                              ^
a.cc:18:31: error: expected ')' before 'M'
   18 |                 if ( s [0]== ’ M ’) m ++;
      |                    ~          ^~
      |                               )
a.cc:19:30: error: '\U00002019' was not declared in this scope
   19 |                 if ( s [0]== ’ A ’) a ++;
      |                              ^
a.cc:19:31: error: expected ')' before 'A'
   19 |                 if ( s [0]== ’ A ’) a ++;
      |                    ~          ^~
      |                               )
a.cc:20:30: error: '\U00002019' was not declared in this scope
   20 |                 if ( s [0]== ’ R ’) r ++;
      |                              ^
a.cc:20:31: error: expected ')' before 'R'
   20 |                 if ( s [0]== ’ R ’) r ++;
      |                    ~          ^~
      |                               )
a.cc:21:30: error: '\U00002019' was not declared in this scope
   21 |                 if ( s [0]== ’ C ’) c ++;
      |                              ^
a.cc:21:31: error: expected ')' before 'C'
   21 |                 if ( s [0]== ’ C ’) c ++;
      |                    ~          ^~
      |                               )
a.cc:22:30: error: '\U00002019' was not declared in this scope
   22 |                 if ( s [0]== ’ H ’) h ++;
      |                              ^
a.cc:22:31: error: expected ')' before 'H'
   22 |                 if ( s [0]== ’ H ’) h ++;
      |                    ~          ^~
      |                               )
a.cc:28:25: warning: unknown escape sequence: '\040'
   28 |                 printf ("% lld \ n " , res )
      |                         ^~~~~~~~~~~~
a.cc:28:45: error: expected ';' before '}' token
   28 |                 printf ("% lld \ n " , res )
      |                                             ^
      |                                             ;
   29 |         }
      |         ~