結果

問題 No.104 国道
ユーザー phsplsphspls
提出日時 2020-03-27 00:39:52
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 59 ms / 5,000 ms
コード長 346 bytes
コンパイル時間 2,177 ms
コンパイル使用メモリ 104,792 KB
実行使用メモリ 23,616 KB
最終ジャッジ日時 2023-08-30 15:55:04
合計ジャッジ時間 5,022 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 58 ms
21,420 KB
testcase_01 AC 57 ms
21,512 KB
testcase_02 AC 57 ms
21,552 KB
testcase_03 AC 54 ms
23,520 KB
testcase_04 AC 55 ms
19,432 KB
testcase_05 AC 57 ms
21,548 KB
testcase_06 AC 56 ms
21,492 KB
testcase_07 AC 57 ms
23,556 KB
testcase_08 AC 57 ms
23,516 KB
testcase_09 AC 56 ms
21,480 KB
testcase_10 AC 59 ms
21,476 KB
testcase_11 AC 57 ms
21,552 KB
testcase_12 AC 56 ms
23,596 KB
testcase_13 AC 56 ms
21,476 KB
testcase_14 AC 56 ms
21,644 KB
testcase_15 AC 54 ms
19,600 KB
testcase_16 AC 56 ms
23,616 KB
testcase_17 AC 56 ms
23,528 KB
testcase_18 AC 57 ms
23,520 KB
testcase_19 AC 56 ms
23,524 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc)
Copyright (C) Microsoft Corporation. All rights reserved.

ソースコード

diff #

using System;
using System.Linq;

public class P0104 {
    public static void Main() {
        var s = Console.ReadLine().ToCharArray();
        s = s.Reverse().ToArray();
        var result = 1 << s.Length;
        for(int i=0; i<s.Length; i++) {
            if(s[i] == 'R') result += 1 << i;
        }
        Console.WriteLine(result);
    }
}
0