結果

問題 No.104 国道
ユーザー notsix4notsix4
提出日時 2021-11-26 21:21:51
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 15 ms / 5,000 ms
コード長 383 bytes
コンパイル時間 242 ms
コンパイル使用メモリ 10,716 KB
実行使用メモリ 7,972 KB
最終ジャッジ日時 2023-09-12 04:17:50
合計ジャッジ時間 1,725 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 15 ms
7,836 KB
testcase_01 AC 14 ms
7,972 KB
testcase_02 AC 14 ms
7,860 KB
testcase_03 AC 15 ms
7,924 KB
testcase_04 AC 14 ms
7,856 KB
testcase_05 AC 14 ms
7,876 KB
testcase_06 AC 14 ms
7,908 KB
testcase_07 AC 14 ms
7,860 KB
testcase_08 AC 14 ms
7,800 KB
testcase_09 AC 14 ms
7,872 KB
testcase_10 AC 14 ms
7,960 KB
testcase_11 AC 14 ms
7,912 KB
testcase_12 AC 14 ms
7,784 KB
testcase_13 AC 14 ms
7,828 KB
testcase_14 AC 14 ms
7,872 KB
testcase_15 AC 14 ms
7,872 KB
testcase_16 AC 14 ms
7,804 KB
testcase_17 AC 14 ms
7,972 KB
testcase_18 AC 14 ms
7,848 KB
testcase_19 AC 14 ms
7,820 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

r=1
while True:
    try:
        s = input()  # Python 2.x と Python 3.x で input() の挙動が異なるので注意
        #if s == '':  # 空行の場合、line の中身は空文字列
          #break
        for i in range(len(s)):
            if s[i]=="L":
                r=r*2
            else:
                r=r*2+1
       
    except EOFError:
        break

print(r)
0