結果

問題 No.104 国道
ユーザー 明智重蔵明智重蔵
提出日時 2015-08-15 09:37:46
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 55 ms / 5,000 ms
コード長 1,076 bytes
コンパイル時間 2,368 ms
コンパイル使用メモリ 105,404 KB
実行使用メモリ 22,660 KB
最終ジャッジ日時 2023-09-25 12:00:45
合計ジャッジ時間 4,654 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 53 ms
22,560 KB
testcase_01 AC 53 ms
20,660 KB
testcase_02 AC 53 ms
20,524 KB
testcase_03 AC 53 ms
22,472 KB
testcase_04 AC 54 ms
22,556 KB
testcase_05 AC 54 ms
20,716 KB
testcase_06 AC 53 ms
20,456 KB
testcase_07 AC 53 ms
20,540 KB
testcase_08 AC 53 ms
22,424 KB
testcase_09 AC 53 ms
20,680 KB
testcase_10 AC 53 ms
20,652 KB
testcase_11 AC 53 ms
20,408 KB
testcase_12 AC 53 ms
20,444 KB
testcase_13 AC 54 ms
22,556 KB
testcase_14 AC 53 ms
22,488 KB
testcase_15 AC 55 ms
20,588 KB
testcase_16 AC 53 ms
22,516 KB
testcase_17 AC 54 ms
18,400 KB
testcase_18 AC 54 ms
20,516 KB
testcase_19 AC 55 ms
22,660 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.Collections.Generic;

class Program
{
    static string InputPattern = "Input5";

    static List<string> GetInputList()
    {
        var WillReturn = new List<string>();

        if (InputPattern == "Input1") {
            WillReturn.Add("LR");
            //5
        }
        else if (InputPattern == "Input2") {
            WillReturn.Add("RLL");
            //12
        }
        else if (InputPattern == "Input3") {
            WillReturn.Add("RLLRLRLRRRLRL");
            //12986
        }
        else if (InputPattern == "Input4") {
            WillReturn.Add("");
            //1
        }
        else {
            string wkStr;
            while ((wkStr = Console.ReadLine()) != null) WillReturn.Add(wkStr);
        }
        return WillReturn;
    }

    static void Main()
    {
        List<string> InputList = GetInputList();
        int CurrRoad = 1;
        foreach (char EachChar in InputList[0]) {
            CurrRoad *= 2;
            if (EachChar == 'R') CurrRoad++;
        }
        Console.WriteLine(CurrRoad);
    }
}
0