結果

問題 No.405 ローマ数字の腕時計
ユーザー 14番14番
提出日時 2016-09-01 09:06:47
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 59 ms / 2,000 ms
コード長 1,270 bytes
コンパイル時間 2,180 ms
コンパイル使用メモリ 106,152 KB
実行使用メモリ 23,580 KB
最終ジャッジ日時 2023-09-21 00:18:57
合計ジャッジ時間 4,676 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 57 ms
21,464 KB
testcase_01 AC 58 ms
23,376 KB
testcase_02 AC 58 ms
21,532 KB
testcase_03 AC 58 ms
21,488 KB
testcase_04 AC 57 ms
21,436 KB
testcase_05 AC 57 ms
23,488 KB
testcase_06 AC 57 ms
21,456 KB
testcase_07 AC 57 ms
21,504 KB
testcase_08 AC 57 ms
21,452 KB
testcase_09 AC 58 ms
21,508 KB
testcase_10 AC 57 ms
21,428 KB
testcase_11 AC 57 ms
19,392 KB
testcase_12 AC 58 ms
23,580 KB
testcase_13 AC 58 ms
21,436 KB
testcase_14 AC 59 ms
23,572 KB
testcase_15 AC 57 ms
21,520 KB
testcase_16 AC 57 ms
21,424 KB
testcase_17 AC 57 ms
23,408 KB
testcase_18 AC 57 ms
23,360 KB
testcase_19 AC 58 ms
23,400 KB
testcase_20 AC 58 ms
23,516 KB
testcase_21 AC 57 ms
21,376 KB
testcase_22 AC 58 ms
23,480 KB
testcase_23 AC 57 ms
19,384 KB
testcase_24 AC 58 ms
21,444 KB
testcase_25 AC 57 ms
23,440 KB
testcase_26 AC 59 ms
21,592 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;
using System.Text;
using System.Linq;


class Program
{
    public void Proc()
    {
        Reader.IsDebug = false;
        string[] moji = new string[] { "I", "II", "III", "IIII", "V", "VI", "VII", "VIII", "IX", "X", "XI", "XII" };

        string[] inpt = Reader.ReadLine().Split(' ');
        int idx = moji.ToList().IndexOf(inpt[0]);
        int add = int.Parse(inpt[1]);

        idx += add;
        idx = idx % moji.Length;
        while (idx < 0)
        {
            idx += moji.Length;
        }

        Console.WriteLine(moji[idx]);
    }



    public class Reader
    {
        public static bool IsDebug = true;
        private static String PlainInput = @"

I -26



";
        private static System.IO.StringReader Sr = null;
        public static string ReadLine()
        {
            if (IsDebug)
            {
                if (Sr == null)
                {
                    Sr = new System.IO.StringReader(PlainInput.Trim());
                }
                return Sr.ReadLine();
            }
            else
            {
                return Console.ReadLine();
            }
        }
    }
    static void Main()
    {
        Program prg = new Program();
        prg.Proc();
    }
}
0