Submission #143860


Source Code Expand

Copy
s = raw_input()
n = len(s)/2
if len(s)%2==0:
    sl = s[:n]
    sr = s[n:][::-1]
    ndiff = sum((1 if sl[i]!=sr[i] else 0) for i in xrange(n))
    if ndiff==1:
        print 25*n*2-2
    else:
        print 25*n*2
else:
    sl = s[:n]
    # sc = s[n]
    sr = s[n+1:][::-1]
    ndiff = sum((1 if sl[i]!=sr[i] else 0) for i in xrange(n))
    if ndiff==1:
        print 25*n*2-2+25
    elif ndiff==0:
        print 0
    else:
        print 25*n*2

Submission Info

Submission Time
Task A - お買い物クライシス
User matsulib
Language Python (2.7.3)
Score 0
Code Size 466 Byte
Status
Exec Time 70 ms
Memory 3380 KB

Test Cases

Set Name Score / Max Score Test Cases
All 0 / 100 char_0.txt, char_1.txt, char_2.txt, char_3.txt, char_4.txt, char_5.txt, char_6.txt, char_7.txt, char_8.txt, char_9.txt, char_B.txt, char_D.txt, char_I.txt, char_O.txt, char_S.txt, char_Z.txt, chars_1.txt, chars_2.txt, chars_3.txt, chars_4.txt, chars_5.txt, hand_1.txt, hand_2.txt, hand_3.txt, hand_4.txt, hand_5.txt, num_1.txt, num_2.txt, num_3.txt, random_1.txt, random_10.txt, random_2.txt, random_3.txt, random_4.txt, random_5.txt, random_6.txt, random_7.txt, random_8.txt, random_9.txt
Case Name Status Exec Time Memory
char_0.txt 70 ms 3260 KB
char_1.txt 48 ms 3264 KB
char_2.txt 49 ms 3264 KB
char_3.txt 50 ms 3368 KB
char_4.txt 48 ms 3268 KB
char_5.txt 53 ms 3264 KB
char_6.txt 45 ms 3252 KB
char_7.txt 47 ms 3264 KB
char_8.txt 48 ms 3256 KB
char_9.txt 49 ms 3260 KB
char_B.txt 48 ms 3268 KB
char_D.txt 49 ms 3260 KB
char_I.txt 46 ms 3256 KB
char_O.txt 52 ms 3260 KB
char_S.txt 49 ms 3264 KB
char_Z.txt 49 ms 3380 KB
chars_1.txt 48 ms 3260 KB
chars_2.txt 54 ms 3368 KB
chars_3.txt 48 ms 3268 KB
chars_4.txt 51 ms 3360 KB
chars_5.txt 51 ms 3256 KB
hand_1.txt 51 ms 3264 KB
hand_2.txt 53 ms 3376 KB
hand_3.txt 47 ms 3268 KB
hand_4.txt 47 ms 3264 KB
hand_5.txt 46 ms 3260 KB
num_1.txt 48 ms 3260 KB
num_2.txt 47 ms 3268 KB
num_3.txt 48 ms 3264 KB
random_1.txt 49 ms 3260 KB
random_10.txt 49 ms 3260 KB
random_2.txt 49 ms 3260 KB
random_3.txt 48 ms 3264 KB
random_4.txt 46 ms 3268 KB
random_5.txt 52 ms 3268 KB
random_6.txt 46 ms 3360 KB
random_7.txt 48 ms 3264 KB
random_8.txt 51 ms 3376 KB
random_9.txt 48 ms 3264 KB
sample_1.txt 47 ms 3260 KB
sample_2.txt 46 ms 3372 KB
sample_3.txt 46 ms 3368 KB