結果

問題 No.290 1010
ユーザー lloyz
提出日時 2023-03-06 21:21:40
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 131 ms / 5,000 ms
コード長 186 bytes
コンパイル時間 174 ms
コンパイル使用メモリ 82,192 KB
実行使用メモリ 181,576 KB
最終ジャッジ日時 2024-09-18 01:56:05
合計ジャッジ時間 2,558 ms
ジャッジサーバーID
(参考情報)
judge6 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 24
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
S = list(map(int, list(input())))

for i in range(n - 1):
    if S[i] == S[i + 1]:
        print("YES")
        exit()
if n >= 4:
    print("YES")
else:
    print("NO")
0