結果
| 問題 | No.290 1010 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2024-05-22 02:52:17 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
AC
|
| 実行時間 | 39 ms / 5,000 ms |
| コード長 | 273 bytes |
| 記録 | |
| コンパイル時間 | 122 ms |
| コンパイル使用メモリ | 85,632 KB |
| 実行使用メモリ | 59,136 KB |
| 最終ジャッジ日時 | 2026-05-27 15:42:28 |
| 合計ジャッジ時間 | 2,123 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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")