結果
問題 |
No.104 国道
|
ユーザー |
|
提出日時 | 2019-02-14 22:04:22 |
言語 | Java (openjdk 23) |
結果 |
RE
|
実行時間 | - |
コード長 | 290 bytes |
コンパイル時間 | 2,156 ms |
コンパイル使用メモリ | 74,200 KB |
実行使用メモリ | 54,236 KB |
最終ジャッジ日時 | 2024-09-13 11:34:00 |
合計ジャッジ時間 | 5,635 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 RE * 1 |
other | AC * 16 |
ソースコード
import java.util.*; class Main { static Scanner sc = new Scanner(System.in); public static void main(String[] args) { String s = sc.next(); int n = 1; for (int i=0; i<s.length(); i++) { if (s.charAt(i) == 'L') n *= 2; else n = n*2 + 1; } System.out.println(n); } }