結果
| 問題 |
No.290 1010
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2024-05-22 02:52:17 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 49 ms / 5,000 ms |
| コード長 | 273 bytes |
| コンパイル時間 | 361 ms |
| コンパイル使用メモリ | 82,392 KB |
| 実行使用メモリ | 60,516 KB |
| 最終ジャッジ日時 | 2024-12-20 18:19:30 |
| 合計ジャッジ時間 | 2,578 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 24 |
ソースコード
N = int(input())
S = '%' + input().rstrip()
if N >= 4:
print("YES")
exit()
for i in range(1, N):
j = i
while j + (j + 1 - i) <= N:
if S[i:j + 1] == S[j + 1:j + (j + 1 - i) + 1]:
print("YES")
exit()
j += 1
print("NO")