結果
問題 |
No.104 国道
|
ユーザー |
![]() |
提出日時 | 2020-11-10 15:37:02 |
言語 | Java (openjdk 23) |
結果 |
RE
|
実行時間 | - |
コード長 | 395 bytes |
コンパイル時間 | 2,574 ms |
コンパイル使用メモリ | 74,760 KB |
実行使用メモリ | 53,608 KB |
最終ジャッジ日時 | 2024-07-22 17:32:04 |
合計ジャッジ時間 | 5,610 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 RE * 1 |
other | AC * 16 |
ソースコード
import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int current = 1; for (char c : sc.next().toCharArray()) { if (c == 'L') { current *= 2; } else { current = current * 2 + 1; } } System.out.println(current); } }