結果

問題 No.1362 [Zelkova 8th Tune] Black Sheep
ユーザー bluemeganebluemegane
提出日時 2021-01-23 07:10:31
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 115 ms / 1,000 ms
コード長 476 bytes
コンパイル時間 1,573 ms
コンパイル使用メモリ 64,904 KB
実行使用メモリ 29,484 KB
最終ジャッジ日時 2023-08-28 16:53:08
合計ジャッジ時間 6,479 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 72 ms
21,088 KB
testcase_01 AC 71 ms
21,240 KB
testcase_02 AC 72 ms
21,124 KB
testcase_03 AC 72 ms
21,172 KB
testcase_04 AC 52 ms
20,536 KB
testcase_05 AC 72 ms
21,252 KB
testcase_06 AC 72 ms
21,204 KB
testcase_07 AC 79 ms
23,384 KB
testcase_08 AC 79 ms
21,324 KB
testcase_09 AC 72 ms
19,188 KB
testcase_10 AC 80 ms
21,388 KB
testcase_11 AC 79 ms
21,320 KB
testcase_12 AC 78 ms
19,224 KB
testcase_13 AC 109 ms
26,860 KB
testcase_14 AC 105 ms
28,184 KB
testcase_15 AC 83 ms
24,104 KB
testcase_16 AC 92 ms
23,804 KB
testcase_17 AC 110 ms
26,988 KB
testcase_18 AC 96 ms
24,484 KB
testcase_19 AC 113 ms
27,348 KB
testcase_20 AC 100 ms
25,844 KB
testcase_21 AC 96 ms
24,568 KB
testcase_22 AC 106 ms
26,680 KB
testcase_23 AC 112 ms
29,344 KB
testcase_24 AC 114 ms
27,300 KB
testcase_25 AC 113 ms
29,432 KB
testcase_26 AC 113 ms
29,404 KB
testcase_27 AC 110 ms
27,380 KB
testcase_28 AC 112 ms
27,420 KB
testcase_29 AC 113 ms
29,408 KB
testcase_30 AC 115 ms
27,416 KB
testcase_31 AC 114 ms
29,484 KB
testcase_32 AC 112 ms
27,348 KB
testcase_33 AC 114 ms
27,472 KB
testcase_34 AC 58 ms
22,056 KB
testcase_35 AC 72 ms
23,108 KB
testcase_36 AC 53 ms
20,652 KB
testcase_37 AC 53 ms
20,640 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

using System;

public class Hello
{
    static void Main()
    {
        var s = Console.ReadLine().Trim();
        getAns(s);
    }
    static void getAns(string s)
    {
        if (s[0] == s[1])
        {
            var t = s.Replace(s[0].ToString(), "");
            var p = s.IndexOf(t) + 1;
            Console.WriteLine("{0} {1}", p, t);
        }
        else if (s[0] == s[2]) Console.WriteLine("2 {0}", s[1]);
        else Console.WriteLine("1 {0}", s[0]);
    }
}
0