Submission #143873


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 B - こだわりの名前
User matsulib
Language Python (2.7.3)
Score 0
Code Size 466 Byte
Status WA
Exec Time 88 ms
Memory 4412 KB

Judge Result

Set Name All
Score / Max Score 0 / 100
Status
AC × 28
WA × 8
Set Name Test Cases
All hand_1.txt, hand_2.txt, hand_3.txt, hand_4.txt, hand_5.txt, hand_6.txt, palindrome_1.txt, palindrome_12345.txt, palindrome_2.txt, palindrome_299998.txt, palindrome_299999.txt, palindrome_3.txt, palindrome_300000.txt, palindrome_4.txt, palindrome_5.txt, palindrome_6789.txt, palindrome_67890.txt, palindrome_mod_1.txt, palindrome_mod_1000.txt, palindrome_mod_10000.txt, palindrome_mod_100001.txt, palindrome_mod_2.txt, palindrome_mod_200000.txt, palindrome_mod_299999.txt, palindrome_mod_3.txt, palindrome_mod_300000.txt, palindrome_mod_4.txt, palindrome_mod_5.txt, palindrome_mod_50001.txt, random_1.txt, random_10.txt, random_100001.txt, random_101.txt, random_3000.txt, random_300000.txt, random_50001.txt
Case Name Status Exec Time Memory
hand_1.txt AC 82 ms 4408 KB
hand_2.txt AC 85 ms 4412 KB
hand_3.txt AC 83 ms 4408 KB
hand_4.txt AC 83 ms 4400 KB
hand_5.txt AC 83 ms 4400 KB
hand_6.txt AC 86 ms 4404 KB
palindrome_1.txt AC 49 ms 3384 KB
palindrome_12345.txt WA 51 ms 3388 KB
palindrome_2.txt AC 50 ms 3380 KB
palindrome_299998.txt AC 83 ms 4412 KB
palindrome_299999.txt WA 84 ms 4412 KB
palindrome_3.txt WA 49 ms 3392 KB
palindrome_300000.txt AC 83 ms 4356 KB
palindrome_4.txt AC 51 ms 3388 KB
palindrome_5.txt WA 50 ms 3380 KB
palindrome_6789.txt WA 54 ms 3320 KB
palindrome_67890.txt AC 58 ms 3632 KB
palindrome_mod_1.txt AC 50 ms 3392 KB
palindrome_mod_1000.txt AC 49 ms 3324 KB
palindrome_mod_10000.txt AC 50 ms 3328 KB
palindrome_mod_100001.txt AC 62 ms 3600 KB
palindrome_mod_2.txt AC 49 ms 3388 KB
palindrome_mod_200000.txt AC 70 ms 4012 KB
palindrome_mod_299999.txt AC 88 ms 4400 KB
palindrome_mod_3.txt AC 49 ms 3308 KB
palindrome_mod_300000.txt AC 86 ms 4404 KB
palindrome_mod_4.txt AC 51 ms 3376 KB
palindrome_mod_5.txt AC 50 ms 3376 KB
palindrome_mod_50001.txt AC 54 ms 3500 KB
random_1.txt AC 50 ms 3388 KB
random_10.txt AC 51 ms 3380 KB
random_100001.txt WA 61 ms 3632 KB
random_101.txt WA 50 ms 3388 KB
random_3000.txt AC 49 ms 3384 KB
random_300000.txt AC 86 ms 4356 KB
random_50001.txt WA 56 ms 3500 KB
sample_1.txt AC 50 ms 3380 KB
sample_2.txt AC 49 ms 3392 KB
sample_3.txt AC 50 ms 3376 KB