結果
| 問題 | No.290 1010 | 
| コンテスト | |
| ユーザー |  rocoder | 
| 提出日時 | 2017-08-02 03:32:25 | 
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 805 ms / 5,000 ms | 
| コード長 | 352 bytes | 
| コンパイル時間 | 121 ms | 
| コンパイル使用メモリ | 12,544 KB | 
| 実行使用メモリ | 12,796 KB | 
| 最終ジャッジ日時 | 2024-10-11 00:50:07 | 
| 合計ジャッジ時間 | 2,651 ms | 
| ジャッジサーバーID (参考情報) | judge4 / judge2 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | AC * 24 | 
ソースコード
# your code goes here
#010
N=int(input())
S=input()
N2=N//2
nd=0
#for i in range(N-2):
 #   if S[i]==s[i+1]:
   #     a="YES"
     #   nd=1
i=1
while i<=N2+1 and nd==0:
    j=0
    #print(S[j:j+i])
    while j+i+i<N+1 and nd==0:
        if S[j:j+i]==S[j+i:j+i+i]:
            a="YES"
            nd=1
        j+=1
    i+=1
if nd==0:
    a="NO"
print(a)
            
            
            
        