結果

問題 No.104 国道
ユーザー Navier_BoltzmannNavier_Boltzmann
提出日時 2023-06-16 08:41:56
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 111 ms / 5,000 ms
コード長 269 bytes
コンパイル時間 300 ms
コンパイル使用メモリ 87,164 KB
実行使用メモリ 73,328 KB
最終ジャッジ日時 2023-09-06 08:44:19
合計ジャッジ時間 3,905 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 106 ms
73,016 KB
testcase_01 AC 108 ms
72,976 KB
testcase_02 AC 109 ms
73,260 KB
testcase_03 AC 109 ms
73,328 KB
testcase_04 AC 107 ms
72,956 KB
testcase_05 AC 111 ms
72,996 KB
testcase_06 AC 110 ms
72,936 KB
testcase_07 AC 110 ms
72,984 KB
testcase_08 AC 109 ms
72,796 KB
testcase_09 AC 109 ms
73,048 KB
testcase_10 AC 111 ms
73,104 KB
testcase_11 AC 108 ms
73,232 KB
testcase_12 AC 110 ms
73,056 KB
testcase_13 AC 108 ms
73,148 KB
testcase_14 AC 106 ms
73,032 KB
testcase_15 AC 106 ms
72,988 KB
testcase_16 AC 108 ms
73,080 KB
testcase_17 AC 106 ms
73,084 KB
testcase_18 AC 108 ms
72,940 KB
testcase_19 AC 108 ms
73,012 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from collections import *
from itertools import *
from functools import *
from heapq import *
import sys,math
input = sys.stdin.readline


S = list(input())[:-1]
n = len(S)
now = 1
for s in S:
    if s=='L':
        now *= 2
    else:
        now = 2*now + 1
print(now)
0