結果
| 問題 | No.104 国道 |
| コンテスト | |
| ユーザー |
takeya_okino
|
| 提出日時 | 2017-06-21 22:26:30 |
| 言語 | Java (openjdk 23) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 452 bytes |
| 記録 | |
| コンパイル時間 | 1,942 ms |
| コンパイル使用メモリ | 74,312 KB |
| 実行使用メモリ | 54,456 KB |
| 最終ジャッジ日時 | 2024-10-02 11:50:53 |
| 合計ジャッジ時間 | 5,049 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | WA * 3 RE * 1 |
| other | WA * 16 |
ソースコード
import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
String s = sc.next();
long ans = 1;
String crlf = System.getProperty("line.separator");
if(s.equals(crlf)) {
for(int i = 0; i < s.length(); i++) {
if(s.charAt(i) == 'L') {
ans *= 2;
} else {
ans = 2 * ans + 1;
}
}
}
System.out.println(ans);
}
}
takeya_okino