CSES - Datatähti 2016 alku - Results
Submission details
Task:Osajono
Sender:Joku72
Submission time:2015-09-29 14:28:44 +0300
Language:Python2
Status:READY
Result:0
Feedback
groupverdictscore
#10
#20
#30
Test results
testverdicttimegroup
#10.06 s1details
#20.07 s1details
#30.06 s1details
#40.05 s1details
#50.06 s1details
#60.05 s2details
#70.06 s2details
#80.06 s2details
#90.06 s2details
#100.06 s2details
#110.05 s3details
#120.06 s3details
#130.06 s3details
#140.06 s3details
#150.06 s3details

Code

text=raw_input()

a=0
b=0
c=0
d=0
e=0
f=0
g=0
h=0
i=0
j=0
k=0
l=0
m=0
n=0
o=0
p=0
q=0
r=0
s=0
t=0
u=0
v=0
w=0
x=0
y=0
z=0

def vastaus(teksti):
    
    lopputulos=0
    
    for n in teksti:
        if n=='A',n=='a':
            a+=1
            lopputulos+=a

        elif n=='B',n=='b':
            b+=1
            lopputulos+=b

        elif n=='C',n=='c':
            c+=1
            lopputulos+=c

        elif n=='D',n=='d':
            d+=1
            lopputulos+=d

        elif n=='E',n=='e':
            e+=1
            lopputulos+=e

        elif n=='F',n=='f':
            f+=1
            lopputulos+=f

        elif n=='G',n=='g':
            g+=1
            lopputulos+=g

        elif n=='H',n=='h':
            h+=1
            lopputulos+=h

        elif n=='I',n=='i':
            i+=1
            lopputulos+=i

        elif n=='J',n=='j':
            j+=1
            lopputulos+=j

        elif n=='K',n=='k':
            k+=1
            lopputulos+=k

        elif n=='L',n=='l':
            l+=1
            lopputulos+=l

        elif n=='M',n=='m':
            M+=1
            lopputulos+=m

        elif n=='N',n=='n':
            n+=1
            lopputulos+=n

        elif n=='O',n=='o':
            o+=1
            lopputulos+=o

        elif n=='P',n=='p':
            p+=1
            lopputulos+=p

        elif n=='Q',n=='q':
            q+=1
            lopputulos+=q

        elif n=='R',n=='r':
            r+=1
            lopputulos+=r

        elif n=='S',n=='s':
            s+=1
            lopputulos+=s

        elif n=='T',n=='t':
            t+=1
            lopputulos+=t

        elif n=='U',n=='u':
            u+=1
            lopputulos+=u

        elif n=='V',n=='v':
            v+=1
            lopputulos+=v

        elif n=='W',n=='w':
            w+=1
            lopputulos+=w

        elif n=='X',n=='x':
            x+=1
            lopputulos+=x

        elif n=='Y',n=='y':
            y+=1
            lopputulos+=y

        elif n=='Z',n=='z':
            z+=1
            lopputulos+=z

        return lopputulos
    
print vastaus(text)

Test details

Test 1

Group: 1

Verdict:

input
BBBAABBBAAAABBAAAABAABAABBBBBB...

correct output
2554

user output
(empty)

Error:
File "input/code.py", line 35
    if n=='A',n=='a':
             ^
SyntaxError: invalid syntax

Test 2

Group: 1

Verdict:

input
GDFVYWQCZAFGICSXOSWBZMGPDBSSVL...

correct output
299

user output
(empty)

Error:
File "input/code.py", line 35
    if n=='A',n=='a':
             ^
SyntaxError: invalid syntax

Test 3

Group: 1

Verdict:

input
AAAAAAAAAAAAAAAAAAAAAAAAAZAAAA...

correct output
4314

user output
(empty)

Error:
File "input/code.py", line 35
    if n=='A',n=='a':
             ^
SyntaxError: invalid syntax

Test 4

Group: 1

Verdict:

input
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA...

correct output
4231

user output
(empty)

Error:
File "input/code.py", line 35
    if n=='A',n=='a':
             ^
SyntaxError: invalid syntax

Test 5

Group: 1

Verdict:

input
QQQQQQQQQQQQQQQQQQQQQQQQQQQQQQ...

correct output
5050

user output
(empty)

Error:
File "input/code.py", line 35
    if n=='A',n=='a':
             ^
SyntaxError: invalid syntax

Test 6

Group: 2

Verdict:

input
BBABABBBABBAABBABBABAABAAABABA...

correct output
6253029

user output
(empty)

Error:
File "input/code.py", line 35
    if n=='A',n=='a':
             ^
SyntaxError: invalid syntax

Test 7

Group: 2

Verdict:

input
RBKJMLDVQMKHYKCNDIVVKOMFUXTFMG...

correct output
485173

user output
(empty)

Error:
File "input/code.py", line 35
    if n=='A',n=='a':
             ^
SyntaxError: invalid syntax

Test 8

Group: 2

Verdict:

input
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA...

correct output
12427725

user output
(empty)

Error:
File "input/code.py", line 35
    if n=='A',n=='a':
             ^
SyntaxError: invalid syntax

Test 9

Group: 2

Verdict:

input
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA...

correct output
12467549

user output
(empty)

Error:
File "input/code.py", line 35
    if n=='A',n=='a':
             ^
SyntaxError: invalid syntax

Test 10

Group: 2

Verdict:

input
QQQQQQQQQQQQQQQQQQQQQQQQQQQQQQ...

correct output
12502500

user output
(empty)

Error:
File "input/code.py", line 35
    if n=='A',n=='a':
             ^
SyntaxError: invalid syntax

Test 11

Group: 3

Verdict:

input
BAAAAABABBABAABAABABABBBABBAAB...

correct output
2500051369

user output
(empty)

Error:
File "input/code.py", line 35
    if n=='A',n=='a':
             ^
SyntaxError: invalid syntax

Test 12

Group: 3

Verdict:

input
ABBURXDRVXAYBPXXOQZNYHLWGUEEWR...

correct output
192407124

user output
(empty)

Error:
File "input/code.py", line 35
    if n=='A',n=='a':
             ^
SyntaxError: invalid syntax

Test 13

Group: 3

Verdict:

input
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA...

correct output
4998050400

user output
(empty)

Error:
File "input/code.py", line 35
    if n=='A',n=='a':
             ^
SyntaxError: invalid syntax

Test 14

Group: 3

Verdict:

input
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA...

correct output
4998850144

user output
(empty)

Error:
File "input/code.py", line 35
    if n=='A',n=='a':
             ^
SyntaxError: invalid syntax

Test 15

Group: 3

Verdict:

input
QQQQQQQQQQQQQQQQQQQQQQQQQQQQQQ...

correct output
5000050000

user output
(empty)

Error:
File "input/code.py", line 35
    if n=='A',n=='a':
             ^
SyntaxError: invalid syntax