結果

問題 No.104 国道
ユーザー kmtrc130kmtrc130
提出日時 2019-03-18 15:27:39
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 52 ms / 5,000 ms
コード長 420 bytes
コンパイル時間 1,928 ms
コンパイル使用メモリ 101,988 KB
実行使用メモリ 22,752 KB
最終ジャッジ日時 2023-09-25 12:38:56
合計ジャッジ時間 4,090 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 50 ms
20,524 KB
testcase_01 AC 50 ms
20,712 KB
testcase_02 AC 50 ms
20,676 KB
testcase_03 AC 50 ms
20,516 KB
testcase_04 AC 50 ms
20,448 KB
testcase_05 AC 51 ms
20,600 KB
testcase_06 AC 51 ms
20,576 KB
testcase_07 AC 50 ms
20,528 KB
testcase_08 AC 51 ms
20,576 KB
testcase_09 AC 50 ms
20,548 KB
testcase_10 AC 51 ms
22,524 KB
testcase_11 AC 50 ms
20,464 KB
testcase_12 AC 50 ms
20,484 KB
testcase_13 AC 52 ms
22,752 KB
testcase_14 AC 51 ms
20,708 KB
testcase_15 AC 51 ms
20,588 KB
testcase_16 AC 51 ms
22,624 KB
testcase_17 AC 51 ms
20,544 KB
testcase_18 AC 51 ms
22,532 KB
testcase_19 AC 51 ms
20,640 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;

class Program
{
    public void Solve()
    {
        int kokudou = 1;

        string LR = Console.ReadLine();

        foreach (char c in LR.ToCharArray())
        {
            kokudou *= 2;
            if (c == 'R') { kokudou++; }
        }

        Console.WriteLine(kokudou);
    }

    static void Main()
    {
        var solver = new Program();
        solver.Solve();
    }
}
0