結果

問題 No.1735 C#
ユーザー O2MTO2MT
提出日時 2021-11-25 23:15:09
言語 C#
(.NET 8.0.203)
結果
AC  
実行時間 44 ms / 2,000 ms
コード長 533 bytes
コンパイル時間 14,294 ms
コンパイル使用メモリ 144,860 KB
実行使用メモリ 163,084 KB
最終ジャッジ日時 2023-09-11 01:13:38
合計ジャッジ時間 15,907 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 43 ms
26,780 KB
testcase_01 AC 43 ms
26,776 KB
testcase_02 AC 44 ms
26,912 KB
testcase_03 AC 43 ms
26,704 KB
testcase_04 AC 43 ms
26,552 KB
testcase_05 AC 43 ms
26,568 KB
testcase_06 AC 43 ms
26,632 KB
testcase_07 AC 44 ms
27,048 KB
testcase_08 AC 44 ms
163,084 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
  Determining projects to restore...
  Restored /home/judge/data/code/main.csproj (in 127 ms).
.NET 向け Microsoft (R) Build Engine バージョン 17.0.0-preview-21470-01+cb055d28f
Copyright (C) Microsoft Corporation.All rights reserved.

  プレビュー版の .NET を使用しています。https://aka.ms/dotnet-core-preview をご覧ください
  main -> /home/judge/data/code/bin/Release/net6.0/main.dll
  main -> /home/judge/data/code/bin/Release/net6.0/publish/

ソースコード

diff #

using System;
using System.Collections.Generic;
using System.Linq;

namespace Sample
{
    class Program
    {
        static void Main(string[] args)
        {
            //var arr = Console.ReadLine().Split(' ').Select(long.Parse).ToArray();
            var S = Console.ReadLine();
            var arr = new List<string>() { "A", "A#","B", "C", "C#", "D", "D#", "E", "F", "F#", "G", "G#" };
            var MOD = arr.Count();
            var i = (arr.IndexOf(S) + 1) % MOD;
            Console.WriteLine(arr[i]);
        }
    }
}
0