結果

問題 No.290 1010
ユーザー steek79steek79
提出日時 2015-10-16 22:44:02
言語 Python2
(2.7.18)
結果
WA  
実行時間 -
コード長 252 bytes
コンパイル時間 218 ms
コンパイル使用メモリ 6,684 KB
実行使用メモリ 14,944 KB
最終ジャッジ日時 2023-09-29 01:18:00
合計ジャッジ時間 2,223 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 12 ms
6,084 KB
testcase_01 AC 12 ms
6,080 KB
testcase_02 WA -
testcase_03 AC 12 ms
5,984 KB
testcase_04 AC 12 ms
6,084 KB
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 AC 11 ms
6,080 KB
testcase_13 AC 12 ms
6,104 KB
testcase_14 AC 11 ms
5,952 KB
testcase_15 AC 11 ms
5,988 KB
testcase_16 AC 12 ms
5,980 KB
testcase_17 AC 12 ms
5,948 KB
testcase_18 WA -
testcase_19 WA -
testcase_20 AC 34 ms
14,756 KB
testcase_21 AC 34 ms
14,708 KB
testcase_22 AC 34 ms
14,708 KB
testcase_23 AC 34 ms
14,944 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N = input()
S = list(raw_input())

if N <= 1:
    print "NO"

else:
    for i in xrange(N-1):
        for w in xrange(1, N-i):
            if S[i:i+w+1] == S[i+w+1:i+2*w+1+1]:
                print "YES"
                exit()
    
    else: print "NO"
0