Task: | Osajono |
Sender: | Joku72 |
Submission time: | 2015-09-29 14:53:00 +0300 |
Language: | Python2 |
Status: | READY |
Result: | 0 |
group | verdict | score |
---|---|---|
#1 | RUNTIME ERROR | 0 |
#2 | RUNTIME ERROR | 0 |
#3 | RUNTIME ERROR | 0 |
test | verdict | time | group | |
---|---|---|---|---|
#1 | ACCEPTED | 0.06 s | 1 | details |
#2 | RUNTIME ERROR | 0.06 s | 1 | details |
#3 | ACCEPTED | 0.06 s | 1 | details |
#4 | ACCEPTED | 0.05 s | 1 | details |
#5 | ACCEPTED | 0.06 s | 1 | details |
#6 | ACCEPTED | 0.06 s | 2 | details |
#7 | RUNTIME ERROR | 0.04 s | 2 | details |
#8 | ACCEPTED | 0.05 s | 2 | details |
#9 | ACCEPTED | 0.06 s | 2 | details |
#10 | ACCEPTED | 0.05 s | 2 | details |
#11 | ACCEPTED | 0.07 s | 3 | details |
#12 | RUNTIME ERROR | 0.06 s | 3 | details |
#13 | ACCEPTED | 0.07 s | 3 | details |
#14 | ACCEPTED | 0.07 s | 3 | details |
#15 | ACCEPTED | 0.15 s | 3 | details |
Code
text=raw_input() text=list(text) def vastaus(teksti): lopputulos=0 a=0 b=0 c=0 d=0 e=0 f=0 g=0 h=0 ik=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 for i in teksti: if i=='A' or i=='a': a+=1 lopputulos+=a elif i=='B' or i=='b': b+=1 lopputulos+=b elif i=='C' or i=='c': c+=1 lopputulos+=c elif i=='D' or i=='d': d+=1 lopputulos+=d elif i=='E' or i=='e': e+=1 lopputulos+=e elif i=='F' or i=='f': f+=1 lopputulos+=f elif i=='G' or i=='g': g+=1 lopputulos+=g elif i=='H' or i=='h': h+=1 lopputulos+=h elif i=='I' or i=='i': ik+=1 lopputulos+=ik elif i=='J' or i=='j': j+=1 lopputulos+=j elif i=='K' or i=='k': k+=1 lopputulos+=k elif i=='L' or i=='l': l+=1 lopputulos+=l elif i=='M' or i=='m': M+=1 lopputulos+=m elif i=='N' or i=='n': n+=1 lopputulos+=n elif i=='O' or i=='o': o+=1 lopputulos+=o elif i=='P' or i=='p': p+=1 lopputulos+=p elif i=='Q' or i=='q': q+=1 lopputulos+=q elif i=='R' or i=='r': r+=1 lopputulos+=r elif i=='S' or i=='s': s+=1 lopputulos+=s elif i=='T' or i=='t': t+=1 lopputulos+=t elif i=='U' or i=='u': u+=1 lopputulos+=u elif i=='V' or i=='v': v+=1 lopputulos+=v elif i=='W' or i=='w': w+=1 lopputulos+=w elif i=='X' or i=='x': x+=1 lopputulos+=x elif i=='Y' or i=='y': y+=1 lopputulos+=y elif i=='Z' or i=='z': z+=1 lopputulos+=z return lopputulos print vastaus(text)
Test details
Test 1
Group: 1
Verdict: ACCEPTED
input |
---|
BBBAABBBAAAABBAAAABAABAABBBBBB... |
correct output |
---|
2554 |
user output |
---|
2554 |
Test 2
Group: 1
Verdict: RUNTIME ERROR
input |
---|
GDFVYWQCZAFGICSXOSWBZMGPDBSSVL... |
correct output |
---|
299 |
user output |
---|
(empty) |
Error:
Traceback (most recent call last): File "input/code.py", line 144, in <module> print vastaus(text) File "input/code.py", line 87, in vastaus M+=1 UnboundLocalError: local variable 'M' referenced before assignment
Test 3
Group: 1
Verdict: ACCEPTED
input |
---|
AAAAAAAAAAAAAAAAAAAAAAAAAZAAAA... |
correct output |
---|
4314 |
user output |
---|
4314 |
Test 4
Group: 1
Verdict: ACCEPTED
input |
---|
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA... |
correct output |
---|
4231 |
user output |
---|
4231 |
Test 5
Group: 1
Verdict: ACCEPTED
input |
---|
QQQQQQQQQQQQQQQQQQQQQQQQQQQQQQ... |
correct output |
---|
5050 |
user output |
---|
5050 |
Test 6
Group: 2
Verdict: ACCEPTED
input |
---|
BBABABBBABBAABBABBABAABAAABABA... |
correct output |
---|
6253029 |
user output |
---|
6253029 |
Test 7
Group: 2
Verdict: RUNTIME ERROR
input |
---|
RBKJMLDVQMKHYKCNDIVVKOMFUXTFMG... |
correct output |
---|
485173 |
user output |
---|
(empty) |
Error:
Traceback (most recent call last): File "input/code.py", line 144, in <module> print vastaus(text) File "input/code.py", line 87, in vastaus M+=1 UnboundLocalError: local variable 'M' referenced before assignment
Test 8
Group: 2
Verdict: ACCEPTED
input |
---|
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA... |
correct output |
---|
12427725 |
user output |
---|
12427725 |
Test 9
Group: 2
Verdict: ACCEPTED
input |
---|
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA... |
correct output |
---|
12467549 |
user output |
---|
12467549 |
Test 10
Group: 2
Verdict: ACCEPTED
input |
---|
QQQQQQQQQQQQQQQQQQQQQQQQQQQQQQ... |
correct output |
---|
12502500 |
user output |
---|
12502500 |
Test 11
Group: 3
Verdict: ACCEPTED
input |
---|
BAAAAABABBABAABAABABABBBABBAAB... |
correct output |
---|
2500051369 |
user output |
---|
2500051369 |
Test 12
Group: 3
Verdict: RUNTIME ERROR
input |
---|
ABBURXDRVXAYBPXXOQZNYHLWGUEEWR... |
correct output |
---|
192407124 |
user output |
---|
(empty) |
Error:
Traceback (most recent call last): File "input/code.py", line 144, in <module> print vastaus(text) File "input/code.py", line 87, in vastaus M+=1 UnboundLocalError: local variable 'M' referenced before assignment
Test 13
Group: 3
Verdict: ACCEPTED
input |
---|
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA... |
correct output |
---|
4998050400 |
user output |
---|
4998050400 |
Test 14
Group: 3
Verdict: ACCEPTED
input |
---|
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA... |
correct output |
---|
4998850144 |
user output |
---|
4998850144 |
Test 15
Group: 3
Verdict: ACCEPTED
input |
---|
QQQQQQQQQQQQQQQQQQQQQQQQQQQQQQ... |
correct output |
---|
5000050000 |
user output |
---|
5000050000 |