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 Python (3.4.3)
Score 200
Code Size 403 Byte
Status AC
Exec Time 17 ms
Memory 3060 KB

Judge Result

Set Name sample All
Score / Max Score 0 / 0 200 / 200
Status
AC × 3
AC × 22
Set Name Test Cases
sample sample01, sample02, sample03
All 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 AC 17 ms 3060 KB
hand02 AC 17 ms 3060 KB
hand03 AC 17 ms 2936 KB
hand04 AC 17 ms 3060 KB
random01 AC 17 ms 3060 KB
random02 AC 17 ms 2940 KB
random03 AC 17 ms 3060 KB
random04 AC 17 ms 3060 KB
random05 AC 17 ms 2940 KB
random06 AC 17 ms 2940 KB
random07 AC 17 ms 3060 KB
random08 AC 17 ms 2940 KB
random09 AC 17 ms 3060 KB
random10 AC 17 ms 3060 KB
random11 AC 17 ms 3060 KB
random12 AC 17 ms 3060 KB
random13 AC 17 ms 2940 KB
random14 AC 17 ms 3060 KB
random15 AC 17 ms 3060 KB
sample01 AC 17 ms 3060 KB
sample02 AC 17 ms 3060 KB
sample03 AC 17 ms 3060 KB