結果

問題 No.290 1010
ユーザー titiatitia
提出日時 2022-10-10 00:00:57
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 203 bytes
コンパイル時間 85 ms
コンパイル使用メモリ 10,764 KB
実行使用メモリ 10,260 KB
最終ジャッジ日時 2023-09-06 02:27:54
合計ジャッジ時間 2,170 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 15 ms
8,000 KB
testcase_01 AC 15 ms
7,884 KB
testcase_02 AC 15 ms
8,296 KB
testcase_03 AC 14 ms
7,944 KB
testcase_04 AC 15 ms
7,820 KB
testcase_05 AC 16 ms
8,084 KB
testcase_06 AC 15 ms
8,248 KB
testcase_07 AC 15 ms
8,224 KB
testcase_08 AC 15 ms
8,288 KB
testcase_09 AC 15 ms
8,212 KB
testcase_10 AC 15 ms
8,252 KB
testcase_11 AC 15 ms
8,216 KB
testcase_12 AC 15 ms
7,872 KB
testcase_13 AC 15 ms
7,940 KB
testcase_14 WA -
testcase_15 WA -
testcase_16 AC 15 ms
8,164 KB
testcase_17 AC 14 ms
8,084 KB
testcase_18 AC 14 ms
8,232 KB
testcase_19 AC 14 ms
8,112 KB
testcase_20 AC 18 ms
10,088 KB
testcase_21 AC 18 ms
10,216 KB
testcase_22 AC 237 ms
10,260 KB
testcase_23 AC 18 ms
10,132 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N=int(input())
S=input()

for i in range(N-1):
    if S[i]==S[i+1]:
        print("YES")
        exit()

for i in range(N-4):
    if S[i:i+2]==S[i+2:i+4]:
        print("YES")
        exit()

print("NO")
0