結果

問題 No.290 1010
ユーザー RyutoRyuto
提出日時 2018-03-19 18:20:36
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 120 ms / 5,000 ms
コード長 286 bytes
コンパイル時間 276 ms
コンパイル使用メモリ 87,132 KB
実行使用メモリ 113,780 KB
最終ジャッジ日時 2023-08-30 22:44:09
合計ジャッジ時間 3,404 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 68 ms
71,392 KB
testcase_01 AC 67 ms
71,468 KB
testcase_02 AC 68 ms
71,328 KB
testcase_03 AC 66 ms
71,372 KB
testcase_04 AC 66 ms
71,172 KB
testcase_05 AC 68 ms
71,504 KB
testcase_06 AC 69 ms
71,504 KB
testcase_07 AC 68 ms
71,172 KB
testcase_08 AC 68 ms
71,144 KB
testcase_09 AC 67 ms
71,548 KB
testcase_10 AC 67 ms
71,208 KB
testcase_11 AC 67 ms
71,440 KB
testcase_12 AC 65 ms
71,208 KB
testcase_13 AC 69 ms
71,512 KB
testcase_14 AC 69 ms
71,484 KB
testcase_15 AC 67 ms
71,284 KB
testcase_16 AC 70 ms
71,504 KB
testcase_17 AC 70 ms
71,204 KB
testcase_18 AC 71 ms
71,300 KB
testcase_19 AC 69 ms
71,412 KB
testcase_20 AC 119 ms
113,660 KB
testcase_21 AC 116 ms
113,684 KB
testcase_22 AC 119 ms
113,780 KB
testcase_23 AC 120 ms
113,688 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#!/usr/bin/env python

N = int(input())
slist = [int(x) for x in list(input().strip())]

for i in range(N+1):
    if (N+i-2)/2 < i:
        break
    for j in range(i, (N+i-2)//2+1):
        if slist[i:j+1] == slist[j+1:2*j-i+2]:
            print('YES')
            quit()
print('NO')
0