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