結果

問題 No.290 1010
ユーザー ぴろずぴろず
提出日時 2015-10-17 15:46:45
言語 Java21
(openjdk 21)
結果
AC  
実行時間 302 ms / 5,000 ms
コード長 361 bytes
コンパイル時間 4,659 ms
コンパイル使用メモリ 71,156 KB
実行使用メモリ 59,472 KB
最終ジャッジ日時 2023-09-29 16:06:24
合計ジャッジ時間 6,669 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 122 ms
56,040 KB
testcase_01 AC 117 ms
56,132 KB
testcase_02 AC 117 ms
56,336 KB
testcase_03 AC 119 ms
56,216 KB
testcase_04 AC 121 ms
54,096 KB
testcase_05 AC 118 ms
55,964 KB
testcase_06 AC 118 ms
56,092 KB
testcase_07 AC 119 ms
56,032 KB
testcase_08 AC 118 ms
56,060 KB
testcase_09 AC 116 ms
55,624 KB
testcase_10 AC 117 ms
56,436 KB
testcase_11 AC 117 ms
56,000 KB
testcase_12 AC 118 ms
55,832 KB
testcase_13 AC 119 ms
56,320 KB
testcase_14 AC 121 ms
56,104 KB
testcase_15 AC 119 ms
55,532 KB
testcase_16 AC 120 ms
58,032 KB
testcase_17 AC 118 ms
55,572 KB
testcase_18 AC 118 ms
55,608 KB
testcase_19 AC 119 ms
55,812 KB
testcase_20 AC 279 ms
59,304 KB
testcase_21 AC 278 ms
58,652 KB
testcase_22 AC 302 ms
59,260 KB
testcase_23 AC 282 ms
59,472 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

package no290;

import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		String s = sc.next();
		if (s.contains("00") || s.contains("11") || s.contains("0101") || s.contains("1010")) {
			System.out.println("YES");
		}else{
			System.out.println("NO");
		}
	}

}
0