結果
| 問題 |
No.104 国道
|
| コンテスト | |
| ユーザー |
Maeda
|
| 提出日時 | 2025-08-25 14:14:16 |
| 言語 | Java (openjdk 23) |
| 結果 |
AC
|
| 実行時間 | 117 ms / 5,000 ms |
| コード長 | 336 bytes |
| コンパイル時間 | 2,154 ms |
| コンパイル使用メモリ | 77,564 KB |
| 実行使用メモリ | 46,656 KB |
| 最終ジャッジ日時 | 2025-08-25 14:14:22 |
| 合計ジャッジ時間 | 5,335 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 16 |
ソースコード
import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
String root = scan.nextLine();
int nowLine = 1;
for(int i = 0 ; i < root.length() ; i++){
nowLine *= 2;
if(root.charAt(i) == 'R'){
nowLine ++;
}
}
System.out.println(nowLine);
}
}
Maeda