Language: C

package main

import (
	"bufio"
	"fmt"
	"os"
	"strconv"
	"strings"
)

func main() {
	S := getStdin()
	cnt := 0
	prev := ""
	for i:=0 ; i<3 ; i++ {
		if S[i] == "R" {
			if prev != "R" {
				cnt = 1
			} else {
				cnt++
			}
		}
	}

	fmt.Printf("%d\n", cnt)
}

var sc = bufio.NewReaderSize(os.Stdin, 1024*1024*10)

func getStdin() string {
	return readLine()
}
func getStdinInt() int {
	str := getStdin()
	rtn, _ := strconv.Atoi(str)
	return rtn
}
func getStdinInt2() (int, int) {
	list := getStdinIntArr()
	return list[0], list[1]
}
func getStdinInt3() (int, int, int) {
	list := getStdinIntArr()
	return list[0], list[1], list[2]
}
func getStdinInt64() int64 {
	str := getStdin()
	rtn, _ := strconv.ParseInt(str, 10, 64)
	return rtn
}
func getStdinInt64_2() (int64, int64) {
	list := getStdinIntArr64()
	return list[0], list[1]
}
func getStdinInt64_3() (int64, int64, int64) {
	list := getStdinIntArr64()
	return list[0], list[1], list[2]
}
func getStdinIntArr() []int {
	str := getStdin()
	list := strings.Split(str, " ")
	rtn := make([]int, len(list))
	for idx, val := range list {
		rtn[idx], _ = strconv.Atoi(val)
	}
	return rtn
}
func getStdinIntArr64() []int64 {
	str := getStdin()
	list := strings.Split(str, " ")
	rtn := make([]int64, len(list))
	for idx, val := range list {
		rtn[idx], _ = strconv.ParseInt(val, 10, 64)
	}
	return rtn
}
func min(a, b int) int {
	if a < b {
		return a
	}
	return b
}
func min64(a, b int64) int64 {
	if a < b {
		return a
	}
	return b
}
func max(a, b int) int {
	if a < b {
		return b
	}
	return a
}
func max64(a, b int64) int64 {
	if a < b {
		return b
	}
	return a
}
func abs(n int) int {
	if n < 0 {
		return -n
	}
	return n
}
func abs64(n int64) int64 {
	if n < 0 {
		return -n
	}
	return n
}
func readLine() string {
	buf := make([]byte, 0, 0)
	for {
		l, p, _ := sc.ReadLine()
		buf = append(buf, l...)
		if !p {
			break
		}
	}
	return string(buf)
}


Compiler output:
main.c:1:1: error: unknown type name 'package'
    1 | package main
      | ^~~~~~~
main.c:3:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'import'
    3 | import (
      | ^~~~~~
main.c:28:1: error: unknown type name 'var'
   28 | var sc = bufio.NewReaderSize(os.Stdin, 1024*1024*10)
      | ^~~
main.c:28:10: error: 'bufio' undeclared here (not in a function)
   28 | var sc = bufio.NewReaderSize(os.Stdin, 1024*1024*10)
      |          ^~~~~
main.c:28:30: error: 'os' undeclared here (not in a function)
   28 | var sc = bufio.NewReaderSize(os.Stdin, 1024*1024*10)
      |                              ^~
main.c:30:1: error: expected ',' or ';' before 'func'
   30 | func getStdin() string {
      | ^~~~
main.c:33:1: error: unknown type name 'func'
   33 | func getStdinInt() int {
      | ^~~~
main.c: In function 'getStdinInt':
main.c:33:24: error: expected identifier or '(' before '{' token
   33 | func getStdinInt() int {
      |                        ^
main.c:38:1: error: unknown type name 'func'
   38 | func getStdinInt2() (int, int) {
      | ^~~~
main.c:38:32: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
   38 | func getStdinInt2() (int, int) {
      |                                ^
main.c:42:1: error: unknown type name 'func'
   42 | func getStdinInt3() (int, int, int) {
      | ^~~~
main.c:42:37: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
   42 | func getStdinInt3() (int, int, int) {
      |                                     ^
main.c:46:1: error: unknown type name 'func'
   46 | func getStdinInt64() int64 {
      | ^~~~
main.c:46:22: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'int64'
   46 | func getStdinInt64() int64 {
      |                      ^~~~~
main.c:51:1: error: unknown type name 'func'
   51 | func getStdinInt64_2() (int64, int64) {
      | ^~~~
main.c:51:39: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
   51 | func getStdinInt64_2() (int64, int64) {
      |                                       ^
main.c:55:1: error: unknown type name 'func'
   55 | func getStdinInt64_3() (int64, int64, int64) {
      | ^~~~
main.c:55:46: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
   55 | func getStdinInt64_3() (int64, int64, int64) {
      |                                              ^
main.c:59:1: error: unknown type name 'func'
   59 | func getStdinIntArr() []int {
      | ^~~~
main.c:59:25: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'int'
   59 | func getStdinIntArr() []int {
      |                         ^~~
main.c:68:1: error: unknown type name 'func'
   68 | func getStdinIntArr64() []int64 {
      | ^~~~
main.c:68:27: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'int64'
   68 | func getStdinIntArr64() []int64 {
      |                           ^~~~~
main.c:77:1: error: unknown type name 'func'
   77 | func min(a, b int) int {
      | ^~~~
main.c:77:14: error: expected ')' before 'int'
   77 | func min(a, b int) int {
      |              ^~~~
      |              )
main.c:83:1: error: unknown type name 'func'
   83 | func min64(a, b int64) int64 {
      | ^~~~
main.c:83:16: error: expected ')' before 'int64'
   83 | func min64(a, b int64) int64 {
      |                ^~~~~~
      |                )
main.c:89:1: error: unknown type name 'func'
   89 | func max(a, b int) int {
      | ^~~~
main.c:89:14: error: expected ')' before 'int'
   89 | func max(a, b int) int {
      |              ^~~~
      |              )
main.c:95:1: error: unknown type name 'func'
   95 | func max64(a, b int64) int64 {
      | ^~~~
main.c:95:16: error: expected ')' before 'int64'
   95 | func max64(a, b int64) int64 {
      |                ^~~~~~
      |                )
main.c:101:1: error: unknown type name 'func'
  101 | func abs(n int) int {
      | ^~~~
main.c:101:10: error: unknown type name 'n'
  101 | func abs(n int) int {
      |          ^
main.c:107:1: error: unknown type name 'func'
  107 | func abs64(n int64) int64 {
      | ^~~~
main.c:107:12: error: unknown type name 'n'
  107 | func abs64(n int64) int64 {
      |            ^
main.c:113:1: error: unknown type name 'func'
  113 | func readLine() string {
      | ^~~~
main.c:113:17: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'string'
  113 | func readLine() string {
      |                 ^~~~~~
main.c:124: error: expected '{' at end of input