結果

問題 No.290 1010
ユーザー bluemeganebluemegane
提出日時 2021-04-22 07:39:09
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 100 ms / 5,000 ms
コード長 569 bytes
コンパイル時間 801 ms
コンパイル使用メモリ 65,396 KB
実行使用メモリ 26,572 KB
最終ジャッジ日時 2023-09-17 09:54:56
合計ジャッジ時間 3,534 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 73 ms
21,260 KB
testcase_01 AC 75 ms
21,388 KB
testcase_02 AC 69 ms
21,072 KB
testcase_03 AC 73 ms
21,360 KB
testcase_04 AC 73 ms
19,304 KB
testcase_05 AC 68 ms
21,140 KB
testcase_06 AC 68 ms
21,156 KB
testcase_07 AC 69 ms
23,184 KB
testcase_08 AC 69 ms
21,148 KB
testcase_09 AC 68 ms
21,080 KB
testcase_10 AC 68 ms
21,308 KB
testcase_11 AC 69 ms
23,192 KB
testcase_12 AC 74 ms
21,448 KB
testcase_13 AC 74 ms
23,452 KB
testcase_14 AC 69 ms
23,136 KB
testcase_15 AC 69 ms
21,196 KB
testcase_16 AC 69 ms
23,168 KB
testcase_17 AC 68 ms
21,252 KB
testcase_18 AC 68 ms
21,068 KB
testcase_19 AC 69 ms
23,160 KB
testcase_20 AC 78 ms
24,724 KB
testcase_21 AC 85 ms
24,504 KB
testcase_22 AC 100 ms
26,572 KB
testcase_23 AC 79 ms
26,536 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

using System;

public class Hello
{
    static void Main()
    {
        Console.ReadLine();
        var s = Console.ReadLine().Trim();
        getAns(s);
    }
    static bool calc(string s, string t) => s.IndexOf(t) != -1;
    static void getAns(string s)
    {
        if (calc(s, "00")) { Console.WriteLine("YES"); return; }
        if (calc(s, "11")) { Console.WriteLine("YES"); return; }
        if (calc(s, "1010")) { Console.WriteLine("YES"); return; }
        if (calc(s, "0101")) { Console.WriteLine("YES"); return; }
        Console.WriteLine("NO");
    }
}
0