結果
問題 | No.104 国道 |
ユーザー |
|
提出日時 | 2016-09-12 02:03:09 |
言語 | Java (openjdk 23) |
結果 |
AC
|
実行時間 | 53 ms / 5,000 ms |
コード長 | 403 bytes |
コンパイル時間 | 3,925 ms |
コンパイル使用メモリ | 74,176 KB |
実行使用メモリ | 37,044 KB |
最終ジャッジ日時 | 2024-11-17 03:44:34 |
合計ジャッジ時間 | 5,682 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 16 |
ソースコード
import java.io.*; public class Run { public static void main (String arg[]) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); String S = br.readLine(); int Road = 1; for (int i = 0; i < S.length(); i++) { Road *= 2; if (S.charAt(i)=='R') Road++; } System.out.println(Road); } }