CSES - Datatähti 2016 alku - Results
Submission details
Task:Osajono
Sender:Arkkimaagi
Submission time:2015-10-11 10:28:53
Language:Python3
Status:READY
Result:0
Feedback
groupverdictscore
#10
#20
#30
Test results
testverdicttimegroup
#10.09 s1details
#20.08 s1details
#30.08 s1details
#40.09 s1details
#50.09 s1details
#60.10 s2details
#70.07 s2details
#80.09 s2details
#90.08 s2details
#100.08 s2details
#110.08 s3details
#120.08 s3details
#130.08 s3details
#140.08 s3details
#150.08 s3details

Code

__author__ = 'toivo'

jono = "AAAAA"
osajonot = []
tulos = 0

for pituus in range(1, len(jono)+1):
    for i in range(0, len(jono)-pituus+1):
        a = jono[i:i+pituus]

        if a[:1] == a[-1:]:
            tulos += 1

        osajonot.append(a)

print(osajonot[0:100])
print(tulos)

Test details

Test 1

Group: 1

Verdict:

input
BBBAABBBAAAABBAAAABAABAABBBBBB...

correct output
2554

user output
['A', 'A', 'A', 'A', 'A', 'AA'...

Test 2

Group: 1

Verdict:

input
GDFVYWQCZAFGICSXOSWBZMGPDBSSVL...

correct output
299

user output
['A', 'A', 'A', 'A', 'A', 'AA'...

Test 3

Group: 1

Verdict:

input
AAAAAAAAAAAAAAAAAAAAAAAAAZAAAA...

correct output
4314

user output
['A', 'A', 'A', 'A', 'A', 'AA'...

Test 4

Group: 1

Verdict:

input
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA...

correct output
4231

user output
['A', 'A', 'A', 'A', 'A', 'AA'...

Test 5

Group: 1

Verdict:

input
QQQQQQQQQQQQQQQQQQQQQQQQQQQQQQ...

correct output
5050

user output
['A', 'A', 'A', 'A', 'A', 'AA'...

Test 6

Group: 2

Verdict:

input
BBABABBBABBAABBABBABAABAAABABA...

correct output
6253029

user output
['A', 'A', 'A', 'A', 'A', 'AA'...

Test 7

Group: 2

Verdict:

input
RBKJMLDVQMKHYKCNDIVVKOMFUXTFMG...

correct output
485173

user output
['A', 'A', 'A', 'A', 'A', 'AA'...

Test 8

Group: 2

Verdict:

input
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA...

correct output
12427725

user output
['A', 'A', 'A', 'A', 'A', 'AA'...

Test 9

Group: 2

Verdict:

input
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA...

correct output
12467549

user output
['A', 'A', 'A', 'A', 'A', 'AA'...

Test 10

Group: 2

Verdict:

input
QQQQQQQQQQQQQQQQQQQQQQQQQQQQQQ...

correct output
12502500

user output
['A', 'A', 'A', 'A', 'A', 'AA'...

Test 11

Group: 3

Verdict:

input
BAAAAABABBABAABAABABABBBABBAAB...

correct output
2500051369

user output
['A', 'A', 'A', 'A', 'A', 'AA'...

Test 12

Group: 3

Verdict:

input
ABBURXDRVXAYBPXXOQZNYHLWGUEEWR...

correct output
192407124

user output
['A', 'A', 'A', 'A', 'A', 'AA'...

Test 13

Group: 3

Verdict:

input
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA...

correct output
4998050400

user output
['A', 'A', 'A', 'A', 'A', 'AA'...

Test 14

Group: 3

Verdict:

input
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA...

correct output
4998850144

user output
['A', 'A', 'A', 'A', 'A', 'AA'...

Test 15

Group: 3

Verdict:

input
QQQQQQQQQQQQQQQQQQQQQQQQQQQQQQ...

correct output
5000050000

user output
['A', 'A', 'A', 'A', 'A', 'AA'...