Language: C++

#include<stdio.h>
#include<iostream>
using namespace std;

int main(){
    char s[3];
    scanf("%s",s);
    if(s[0]=='R'&&s[1]=='R'&&s[2]=='R') printf("%d",3);
    else if(s[0]=='R'&&s[1]=='R'&&s[2]=='S') printf('%d',2);
    else if(s[0]=='R'&&s[1]=='S'&&s[2]=='R')printf('%d',2);
    else if(s[0]=='R'&&s[1]=='S'&&s[2]=='S')printf('%d',1);
    else if(s[0]=='S'&&s[1]=='R'&&s[2]=='R')printf('%d',2);
    else if(s[0]=='S'&&s[1]=='S'&&s[2]=='R')printf('%d',1);
    else if(s[0]=='S'&&s[1]=='S'&&s[2]=='S')printf('%d',0);
    else if(s[0]=='S'&&s[1]=='R'&&s[2]=='S')printf('%d',1);
    return 0;
}    

Compiler output:
a.cc:9:53: warning: multi-character character constant [-Wmultichar]
    9 |     else if(s[0]=='R'&&s[1]=='R'&&s[2]=='S') printf('%d',2);
      |                                                     ^~~~
a.cc:10:52: warning: multi-character character constant [-Wmultichar]
   10 |     else if(s[0]=='R'&&s[1]=='S'&&s[2]=='R')printf('%d',2);
      |                                                    ^~~~
a.cc:11:52: warning: multi-character character constant [-Wmultichar]
   11 |     else if(s[0]=='R'&&s[1]=='S'&&s[2]=='S')printf('%d',1);
      |                                                    ^~~~
a.cc:12:52: warning: multi-character character constant [-Wmultichar]
   12 |     else if(s[0]=='S'&&s[1]=='R'&&s[2]=='R')printf('%d',2);
      |                                                    ^~~~
a.cc:13:52: warning: multi-character character constant [-Wmultichar]
   13 |     else if(s[0]=='S'&&s[1]=='S'&&s[2]=='R')printf('%d',1);
      |                                                    ^~~~
a.cc:14:52: warning: multi-character character constant [-Wmultichar]
   14 |     else if(s[0]=='S'&&s[1]=='S'&&s[2]=='S')printf('%d',0);
      |                                                    ^~~~
a.cc:15:52: warning: multi-character character constant [-Wmultichar]
   15 |     else if(s[0]=='S'&&s[1]=='R'&&s[2]=='S')printf('%d',1);
      |                                                    ^~~~
a.cc: In function 'int main()':
a.cc:9:53: error: invalid conversion from 'int' to 'const char*' [-fpermissive]
    9 |     else if(s[0]=='R'&&s[1]=='R'&&s[2]=='S') printf('%d',2);
      |                                                     ^~~~
      |                                                     |
      |                                                     int
In file included from a.cc:1:
/usr/include/stdio.h:363:43: note:   initializing argument 1 of 'int printf(const char*, ...)'
  363 | extern int printf (const char *__restrict __format, ...);
      |                    ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
a.cc:10:52: error: invalid conversion from 'int' to 'const char*' [-fpermissive]
   10 |     else if(s[0]=='R'&&s[1]=='S'&&s[2]=='R')printf('%d',2);
      |                                                    ^~~~
      |                                                    |
      |                                                    int
/usr/include/stdio.h:363:43: note:   initializing argument 1 of 'int printf(const char*, ...)'
  363 | extern int printf (const char *__restrict __format, ...);
      |                    ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
a.cc:11:52: error: invalid conversion from 'int' to 'const char*' [-fpermissive]
   11 |     else if(s[0]=='R'&&s[1]=='S'&&s[2]=='S')printf('%d',1);
      |                                                    ^~~~
      |                                                    |
      |                                                    int
/usr/include/stdio.h:363:43: note:   initializing argument 1 of 'int printf(const char*, ...)'
  363 | extern int printf (const char *__restrict __format, ...);
      |                    ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
a.cc:12:52: error: invalid conversion from 'int' to 'const char*' [-fpermissive]
   12 |     else if(s[0]=='S'&&s[1]=='R'&&s[2]=='R')printf('%d',2);
      |                                                    ^~~~
      |                                                    |
      |                                                    int
/usr/include/stdio.h:363:43: note:   initializing argument 1 of 'int printf(const char*, ...)'
  363 | extern int printf (const char *__restrict __format, ...);
      |                    ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
a.cc:13:52: error: invalid conversion from 'int' to 'const char*' [-fpermissive]
   13 |     else if(s[0]=='S'&&s[1]=='S'&&s[2]=='R')printf('%d',1);
      |                                                    ^~~~
      |                                                    |
      |                                                    int
/usr/include/stdio.h:363:43: note:   initializing argument 1 of 'int printf(const char*, ...)'
  363 | extern int printf (const char *__restrict __format, ...);
      |                    ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
a.cc:14:52: error: invalid conversion from 'int' to 'const char*' [-fpermissive]
   14 |     else if(s[0]=='S'&&s[1]=='S'&&s[2]=='S')printf('%d',0);
      |                                                    ^~~~
      |                                                    |
      |                                                    int
/usr/include/stdio.h:363:43: note:   initializing argument 1 of 'int printf(const char*, ...)'
  363 | extern int printf (const char *__restrict __format, ...);
      |                    ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
a.cc:15:52: error: invalid conversion from 'int' to 'const char*' [-fpermissive]
   15 |     else if(s[0]=='S'&&s[1]=='R'&&s[2]=='S')printf('%d',1);
      |                                                    ^~~~
      |                                                    |
      |                                                    int
/usr/include/stdio.h:363:43: note:   initializing argument 1 of 'int printf(const char*, ...)'
  363 | extern int printf (const char *__restrict __format, ...);
      |                    ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~