結果

問題 No.405 ローマ数字の腕時計
ユーザー バカらっくバカらっく
提出日時 2018-02-17 22:57:18
言語 C#(csc)
(csc 3.9.0)
結果
RE  
実行時間 -
コード長 1,252 bytes
コンパイル時間 3,197 ms
コンパイル使用メモリ 105,832 KB
実行使用メモリ 23,688 KB
最終ジャッジ日時 2023-09-06 17:56:45
合計ジャッジ時間 5,555 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 57 ms
23,688 KB
testcase_01 AC 57 ms
23,676 KB
testcase_02 RE -
testcase_03 AC 57 ms
21,640 KB
testcase_04 AC 57 ms
21,612 KB
testcase_05 AC 57 ms
21,548 KB
testcase_06 AC 56 ms
21,500 KB
testcase_07 AC 56 ms
21,508 KB
testcase_08 AC 57 ms
21,612 KB
testcase_09 AC 56 ms
21,632 KB
testcase_10 AC 56 ms
21,540 KB
testcase_11 AC 56 ms
21,648 KB
testcase_12 RE -
testcase_13 RE -
testcase_14 RE -
testcase_15 RE -
testcase_16 RE -
testcase_17 RE -
testcase_18 RE -
testcase_19 AC 60 ms
21,764 KB
testcase_20 AC 59 ms
21,628 KB
testcase_21 AC 59 ms
21,684 KB
testcase_22 AC 60 ms
23,684 KB
testcase_23 AC 58 ms
21,628 KB
testcase_24 AC 59 ms
21,540 KB
testcase_25 RE -
testcase_26 RE -
権限があれば一括ダウンロードができます
コンパイルメッセージ
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.IO;
using System.Linq;
using System.Collections.Generic;
using System.Text;

public class Program
{

    public void Proc()
    {
        string[] roman = new string[] { "I", "II", "III", "IIII", "V", "VI", "VII", "VIII", "IX", "X", "XI", "XII" };
        string[] inpt = Reader.ReadLine().Split(' ');
        int idx = roman.ToList().FindIndex(a=>a.Equals(inpt[0]));
        int addIdx = int.Parse(inpt[1]);
        idx = (idx + addIdx) % roman.Length;
        Console.WriteLine(roman[idx]);
    }


    public class Reader
    {
        private static StringReader sr;
        public static bool IsDebug = false;
        public static string ReadLine()
        {
            if (IsDebug)
            {
                if (sr == null)
                {
                    sr = new StringReader(InputText.Trim());
                }
                return sr.ReadLine();
            }
            else
            {
                return Console.ReadLine();
            }
        }
        private static string InputText = @"



8
hidamari
yunocchi


";
    }

    public static void Main(string[] args)
    {
#if DEBUG
        Reader.IsDebug = true;
#endif
        Program prg = new Program();
        prg.Proc();
    }
}
0