結果
| 問題 |
No.104 国道
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2023-06-16 08:41:56 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 56 ms / 5,000 ms |
| コード長 | 269 bytes |
| コンパイル時間 | 475 ms |
| コンパイル使用メモリ | 82,368 KB |
| 実行使用メモリ | 55,808 KB |
| 最終ジャッジ日時 | 2024-06-24 03:28:14 |
| 合計ジャッジ時間 | 2,668 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 16 |
ソースコード
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)