結果
| 問題 | 
                            No.104 国道
                             | 
                    
| コンテスト | |
| ユーザー | 
                             | 
                    
| 提出日時 | 2017-11-01 23:21:45 | 
| 言語 | Python3  (3.13.1 + numpy 2.2.1 + scipy 1.14.1)  | 
                    
| 結果 | 
                             
                                WA
                                 
                             
                            
                         | 
                    
| 実行時間 | - | 
| コード長 | 346 bytes | 
| コンパイル時間 | 131 ms | 
| コンパイル使用メモリ | 12,416 KB | 
| 実行使用メモリ | 10,496 KB | 
| 最終ジャッジ日時 | 2024-11-22 14:48:08 | 
| 合計ジャッジ時間 | 1,681 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge4 / judge2 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 3 WA * 1 | 
| other | AC * 16 | 
ソースコード
def main():
    S = input()
    print(get_result(S))
def get_result(string):
    if len(string) == 0:
        return 0
    binary = string.replace('L', '0').replace('R', '1')
    ordinary = int(binary, 2)
    #print(ordinary)
    start = 2 ** len(string)
    #print(start)
    return (start + ordinary)
if __name__ == '__main__':
    main()