A問題 Rainy Season
1 2 3 4 5 6 7 8 9 10 11 12 13 |
s = input() n = s.count('R') if n==0: print(0) elif n==1: print(1) elif n==3: print(3) elif n==2: if s[1]=='R': print(2) else: print(1) |
1 2 3 4 5 6 7 8 9 10 11 12 13 |
s = input() n = s.count('R') if n==0: print(0) elif n==1: print(1) elif n==3: print(3) elif n==2: if s[1]=='R': print(2) else: print(1) |
コメント