CSES - Datatähti 2016 alku - Results
Submission details
Task:Osajono
Sender:Lare
Submission time:2015-09-29 13:27:00 +0300
Language:Python2
Status:READY
Result:0
Feedback
groupverdictscore
#10
#20
#30
Test results
testverdicttimegroup
#10.05 s1details
#20.05 s1details
#30.05 s1details
#40.05 s1details
#50.06 s1details
#60.00 s2details
#70.00 s2details
#80.00 s2details
#90.00 s2details
#100.00 s2details
#110.00 s3details
#120.00 s3details
#130.00 s3details
#140.00 s3details
#150.00 s3details

Code

substring = str(raw_input("substring: "))

count = 0
l = []

for x in range(len(substring)+1):
    for y in range(len(substring)+1):
        test = substring[x:y]
        if test != "":
            if test[-1] == test[0]:
                print(test)
                count += 1
                l.append(test)

print(count)

Test details

Test 1

Group: 1

Verdict:

input
BBBAABBBAAAABBAAAABAABAABBBBBB...

correct output
2554

user output
substring: B
BB
BBB
BBBAAB
BBBAABB
...

Test 2

Group: 1

Verdict:

input
GDFVYWQCZAFGICSXOSWBZMGPDBSSVL...

correct output
299

user output
substring: G
GDFVYWQCZAFG
GDFVYWQCZAFGICSXOSWBZMG
D
DFVYWQCZAFGICSXOSWBZMGPD
...

Test 3

Group: 1

Verdict:

input
AAAAAAAAAAAAAAAAAAAAAAAAAZAAAA...

correct output
4314

user output
substring: A
AA
AAA
AAAA
AAAAA
...

Test 4

Group: 1

Verdict:

input
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA...

correct output
4231

user output
substring: A
AA
AAA
AAAA
AAAAA
...

Test 5

Group: 1

Verdict:

input
QQQQQQQQQQQQQQQQQQQQQQQQQQQQQQ...

correct output
5050

user output
substring: Q
QQ
QQQ
QQQQ
QQQQQ
...

Test 6

Group: 2

Verdict:

input
BBABABBBABBAABBABBABAABAAABABA...

correct output
6253029

user output
(empty)

Test 7

Group: 2

Verdict:

input
RBKJMLDVQMKHYKCNDIVVKOMFUXTFMG...

correct output
485173

user output
(empty)

Test 8

Group: 2

Verdict:

input
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA...

correct output
12427725

user output
(empty)

Test 9

Group: 2

Verdict:

input
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA...

correct output
12467549

user output
(empty)

Test 10

Group: 2

Verdict:

input
QQQQQQQQQQQQQQQQQQQQQQQQQQQQQQ...

correct output
12502500

user output
(empty)

Test 11

Group: 3

Verdict:

input
BAAAAABABBABAABAABABABBBABBAAB...

correct output
2500051369

user output
(empty)

Test 12

Group: 3

Verdict:

input
ABBURXDRVXAYBPXXOQZNYHLWGUEEWR...

correct output
192407124

user output
(empty)

Test 13

Group: 3

Verdict:

input
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA...

correct output
4998050400

user output
(empty)

Test 14

Group: 3

Verdict:

input
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA...

correct output
4998850144

user output
(empty)

Test 15

Group: 3

Verdict:

input
QQQQQQQQQQQQQQQQQQQQQQQQQQQQQQ...

correct output
5000050000

user output
(empty)