結果

問題 No.290 1010
ユーザー tsunabittsunabit
提出日時 2020-03-25 13:31:31
言語 Java19
(openjdk 21)
結果
WA  
実行時間 -
コード長 393 bytes
コンパイル時間 3,528 ms
コンパイル使用メモリ 72,240 KB
実行使用メモリ 59,624 KB
最終ジャッジ日時 2023-08-30 09:33:11
合計ジャッジ時間 9,217 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 127 ms
55,804 KB
testcase_01 AC 125 ms
56,384 KB
testcase_02 AC 126 ms
55,968 KB
testcase_03 AC 130 ms
56,004 KB
testcase_04 AC 127 ms
55,984 KB
testcase_05 AC 125 ms
56,092 KB
testcase_06 AC 127 ms
55,976 KB
testcase_07 AC 126 ms
55,568 KB
testcase_08 AC 126 ms
56,028 KB
testcase_09 AC 126 ms
55,444 KB
testcase_10 AC 126 ms
56,708 KB
testcase_11 AC 127 ms
55,816 KB
testcase_12 AC 125 ms
55,808 KB
testcase_13 AC 125 ms
55,960 KB
testcase_14 WA -
testcase_15 WA -
testcase_16 AC 128 ms
55,760 KB
testcase_17 AC 126 ms
56,212 KB
testcase_18 AC 127 ms
55,808 KB
testcase_19 AC 125 ms
55,820 KB
testcase_20 AC 289 ms
59,556 KB
testcase_21 AC 283 ms
59,180 KB
testcase_22 WA -
testcase_23 AC 283 ms
59,060 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;
import java.io.*;
import java.math.*;

public class No290 {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int mae = 2;
		String s = sc.next();
		for(int i = 0; i < n; i++) {
			int t = s.charAt(i);
			if(mae == t) {
				System.out.println("YES");
				return;
			}
			mae = t;
		}
		System.out.println("NO");
	}
}
0