結果

問題 No.104 国道
ユーザー ssmkzkssmkzk
提出日時 2018-06-14 16:40:21
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
MLE  
実行時間 -
コード長 351 bytes
コンパイル時間 1,131 ms
コンパイル使用メモリ 10,532 KB
実行使用メモリ 813,596 KB
最終ジャッジ日時 2023-09-13 04:09:45
合計ジャッジ時間 4,096 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 14 ms
7,736 KB
testcase_01 AC 15 ms
7,872 KB
testcase_02 AC 16 ms
8,200 KB
testcase_03 AC 15 ms
7,920 KB
testcase_04 AC 16 ms
7,824 KB
testcase_05 AC 15 ms
7,784 KB
testcase_06 AC 15 ms
7,812 KB
testcase_07 AC 14 ms
7,788 KB
testcase_08 AC 14 ms
7,868 KB
testcase_09 AC 15 ms
7,792 KB
testcase_10 AC 14 ms
7,788 KB
testcase_11 AC 15 ms
7,868 KB
testcase_12 AC 15 ms
8,308 KB
testcase_13 AC 22 ms
13,488 KB
testcase_14 AC 78 ms
53,088 KB
testcase_15 MLE -
testcase_16 MLE -
testcase_17 -- -
testcase_18 -- -
testcase_19 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

N = input()
length = len(N)
already_use = 0

for i in range(length):
    already_use += 2**i

new_load = 2 ** (length)
l_new_load = [i for i in range(1, new_load + 1)]

for i in range(length):
    if N[i] == "L":
        del l_new_load[len(l_new_load) // 2:]
    else:
        del l_new_load[:len(l_new_load) // 2 ]

print(already_use + l_new_load[0])
0