CSES - Datatähti 2016 alku - Results
Submission details
Task:Osajono
Sender:xylix
Submission time:2015-09-30 12:47:54 +0300
Language:Python3
Status:READY
Result:0
Feedback
groupverdictscore
#10
#20
#30
Test results
testverdicttimegroup
#10.09 s1details
#20.08 s1details
#30.10 s1details
#40.08 s1details
#50.08 s1details
#60.09 s2details
#70.07 s2details
#80.08 s2details
#90.07 s2details
#100.08 s2details
#110.12 s3details
#120.10 s3details
#130.11 s3details
#140.11 s3details
#150.10 s3details

Code

string=input()
lista={}
for i in string:
    if(i in lista):
        lista[i]+=1
    else:
        lista[i]=1
print(lista)
result=0
for key, value in lista.items():
    kappa=0
    for i in range(value+1):
        kappa+=i
    result+=kappa
print(result)

Test details

Test 1

Group: 1

Verdict:

input
BBBAABBBAAAABBAAAABAABAABBBBBB...

correct output
2554

user output
{'B': 52, 'A': 48}
2554

Test 2

Group: 1

Verdict:

input
GDFVYWQCZAFGICSXOSWBZMGPDBSSVL...

correct output
299

user output
{'L': 5, 'D': 5, 'G': 3, 'W': ...

Test 3

Group: 1

Verdict:

input
AAAAAAAAAAAAAAAAAAAAAAAAAZAAAA...

correct output
4314

user output
{'A': 92, 'Z': 8}
4314

Test 4

Group: 1

Verdict:

input
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA...

correct output
4231

user output
{'A': 91, 'Z': 9}
4231

Test 5

Group: 1

Verdict:

input
QQQQQQQQQQQQQQQQQQQQQQQQQQQQQQ...

correct output
5050

user output
{'Q': 100}
5050

Test 6

Group: 2

Verdict:

input
BBABABBBABBAABBABBABAABAAABABA...

correct output
6253029

user output
{'B': 2523, 'A': 2477}
6253029

Test 7

Group: 2

Verdict:

input
RBKJMLDVQMKHYKCNDIVVKOMFUXTFMG...

correct output
485173

user output
{'H': 200, 'Y': 190, 'S': 198,...

Test 8

Group: 2

Verdict:

input
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA...

correct output
12427725

user output
{'Z': 15, 'A': 4985}
12427725

Test 9

Group: 2

Verdict:

input
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA...

correct output
12467549

user output
{'Z': 7, 'A': 4993}
12467549

Test 10

Group: 2

Verdict:

input
QQQQQQQQQQQQQQQQQQQQQQQQQQQQQQ...

correct output
12502500

user output
{'Q': 5000}
12502500

Test 11

Group: 3

Verdict:

input
BAAAAABABBABAABAABABABBBABBAAB...

correct output
2500051369

user output
{'B': 49963, 'A': 50037}
2500051369

Test 12

Group: 3

Verdict:

input
ABBURXDRVXAYBPXXOQZNYHLWGUEEWR...

correct output
192407124

user output
{'R': 3855, 'Y': 3916, 'G': 39...

Test 13

Group: 3

Verdict:

input
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA...

correct output
4998050400

user output
{'A': 99980, 'Z': 20}
4998050400

Test 14

Group: 3

Verdict:

input
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA...

correct output
4998850144

user output
{'Z': 12, 'A': 99988}
4998850144

Test 15

Group: 3

Verdict:

input
QQQQQQQQQQQQQQQQQQQQQQQQQQQQQQ...

correct output
5000050000

user output
{'Q': 100000}
5000050000