結果

問題 No.1362 [Zelkova 8th Tune] Black Sheep
ユーザー bluemeganebluemegane
提出日時 2021-01-23 07:19:42
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 97 ms / 1,000 ms
コード長 603 bytes
コンパイル時間 850 ms
コンパイル使用メモリ 63,064 KB
実行使用メモリ 24,324 KB
最終ジャッジ日時 2023-08-28 17:02:32
合計ジャッジ時間 5,125 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 58 ms
22,864 KB
testcase_01 AC 56 ms
20,804 KB
testcase_02 AC 56 ms
22,868 KB
testcase_03 AC 56 ms
22,988 KB
testcase_04 AC 56 ms
20,880 KB
testcase_05 AC 55 ms
20,812 KB
testcase_06 AC 55 ms
18,772 KB
testcase_07 AC 56 ms
21,000 KB
testcase_08 AC 56 ms
20,916 KB
testcase_09 AC 56 ms
20,980 KB
testcase_10 AC 57 ms
23,044 KB
testcase_11 AC 56 ms
22,864 KB
testcase_12 AC 56 ms
20,824 KB
testcase_13 AC 85 ms
21,856 KB
testcase_14 AC 84 ms
23,872 KB
testcase_15 AC 60 ms
22,840 KB
testcase_16 AC 69 ms
20,996 KB
testcase_17 AC 88 ms
22,260 KB
testcase_18 AC 74 ms
23,300 KB
testcase_19 AC 90 ms
24,152 KB
testcase_20 AC 78 ms
23,500 KB
testcase_21 AC 75 ms
21,452 KB
testcase_22 AC 85 ms
21,868 KB
testcase_23 AC 96 ms
24,324 KB
testcase_24 AC 91 ms
24,272 KB
testcase_25 AC 90 ms
22,236 KB
testcase_26 AC 94 ms
22,228 KB
testcase_27 AC 97 ms
22,420 KB
testcase_28 AC 92 ms
22,316 KB
testcase_29 AC 93 ms
22,280 KB
testcase_30 AC 93 ms
22,172 KB
testcase_31 AC 92 ms
22,192 KB
testcase_32 AC 93 ms
24,264 KB
testcase_33 AC 92 ms
20,240 KB
testcase_34 AC 91 ms
22,180 KB
testcase_35 AC 55 ms
20,824 KB
testcase_36 AC 56 ms
20,832 KB
testcase_37 AC 55 ms
21,024 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

using System.Collections.Generic;
using System;

public class Hello
{
    static void Main()
    {
        var s = Console.ReadLine().Trim();
        getAns(s);
    }
    static void getAns(string s)
    {
        var d = new Dictionary<char, int>();
        for (int i = 0; i < s.Length; i++)
        {
            if (d.ContainsKey(s[i])) d[s[i]]++;
            else d[s[i]] = 1;
        }
        foreach(var x in d)
        {
            if (x.Value == 1)
            {
                Console.WriteLine("{0} {1}",s.IndexOf(x.Key) + 1,x.Key);
                return;
            }
        }
    }
}
0