結果

問題 No.290 1010
ユーザー ぴろず
提出日時 2015-10-17 15:46:45
言語 Java
(openjdk 23)
結果
AC  
実行時間 308 ms / 5,000 ms
コード長 361 bytes
コンパイル時間 2,017 ms
コンパイル使用メモリ 73,656 KB
実行使用メモリ 57,252 KB
最終ジャッジ日時 2024-07-22 10:12:50
合計ジャッジ時間 6,280 ms
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 24
権限があれば一括ダウンロードができます

ソースコード

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