Submission #11115117


Source Code Expand

Copy
#!/usr/bin/ python3.8
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

S = read().rstrip().decode()


def test(S):
    N = len(S)
    words = []
    words.append(S)
    words.append(S[: (N - 1) // 2])
    words.append(S[(N + 1) // 2:])
    return all(T == T[::-1] for T in words)


print('Yes' if test(S) else 'No')

Submission Info

Submission Time
Task B - String Palindrome
User maspy
Language Python3 (3.4.3)
Score 200
Code Size 403 Byte
Status
Exec Time 17 ms
Memory 3060 KB

Judge Result

Set Name Score / Max Score Test Cases
sample 0 / 0 sample01, sample02, sample03
All 200 / 200 hand01, hand02, hand03, hand04, random01, random02, random03, random04, random05, random06, random07, random08, random09, random10, random11, random12, random13, random14, random15, sample01, sample02, sample03
Case Name Status Exec Time Memory
hand01 17 ms 3060 KB
hand02 17 ms 3060 KB
hand03 17 ms 2936 KB
hand04 17 ms 3060 KB
random01 17 ms 3060 KB
random02 17 ms 2940 KB
random03 17 ms 3060 KB
random04 17 ms 3060 KB
random05 17 ms 2940 KB
random06 17 ms 2940 KB
random07 17 ms 3060 KB
random08 17 ms 2940 KB
random09 17 ms 3060 KB
random10 17 ms 3060 KB
random11 17 ms 3060 KB
random12 17 ms 3060 KB
random13 17 ms 2940 KB
random14 17 ms 3060 KB
random15 17 ms 3060 KB
sample01 17 ms 3060 KB
sample02 17 ms 3060 KB
sample03 17 ms 3060 KB