結果

問題 No.290 1010
ユーザー bluemeganebluemegane
提出日時 2021-04-22 07:42:21
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 73 ms / 5,000 ms
コード長 500 bytes
コンパイル時間 753 ms
コンパイル使用メモリ 65,288 KB
実行使用メモリ 25,916 KB
最終ジャッジ日時 2023-09-17 09:55:02
合計ジャッジ時間 3,298 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 73 ms
21,372 KB
testcase_01 AC 72 ms
21,336 KB
testcase_02 AC 68 ms
21,160 KB
testcase_03 AC 67 ms
19,152 KB
testcase_04 AC 67 ms
21,160 KB
testcase_05 AC 67 ms
23,120 KB
testcase_06 AC 68 ms
21,104 KB
testcase_07 AC 68 ms
19,056 KB
testcase_08 AC 67 ms
21,136 KB
testcase_09 AC 68 ms
23,176 KB
testcase_10 AC 67 ms
23,216 KB
testcase_11 AC 68 ms
23,128 KB
testcase_12 AC 68 ms
23,216 KB
testcase_13 AC 67 ms
21,144 KB
testcase_14 AC 48 ms
20,436 KB
testcase_15 AC 49 ms
22,508 KB
testcase_16 AC 49 ms
20,388 KB
testcase_17 AC 49 ms
22,492 KB
testcase_18 AC 49 ms
20,512 KB
testcase_19 AC 49 ms
20,576 KB
testcase_20 AC 60 ms
25,916 KB
testcase_21 AC 60 ms
23,832 KB
testcase_22 AC 59 ms
23,808 KB
testcase_23 AC 59 ms
25,884 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 (s.Length >= 4) { Console.WriteLine("YES"); return; }
        if (calc(s, "00")) { Console.WriteLine("YES"); return; }
        if (calc(s, "11")) { Console.WriteLine("YES"); return; }
        Console.WriteLine("NO");
    }
}
0