## String Finding (Python 3 Version)

View as PDF

Points: 15 (partial)
Time limit: 0.6s
Memory limit: 1G

Author:
Problem type
Allowed languages
Python

To celebrate Python 2's death, Roger challenges you to find all occurrences of a string in . Of course, you may only use Python 3.

#### Input Specification

The first line contains a string .

The second line contains a string .

Both strings will only contain lowercase letters. You may assume .

#### Output Specification

Let be the sum of all 1-indexed occurrences of in and let be the xor of all 1-indexed occurrences of in .

Print two lines. Print on the first line and on the second line.

#### Scoring

If your solution is incorrect, it earns zero marks.

Let be the length of the shortest correct solution to this problem. If your program has length (in bytes) strictly less than , it earns 99% of full credit. Otherwise, it earns of the available marks, where is the length of your program. You will receive feedback on the length of your program explicitly.

The scoring is intentionally designed to make it easy to see who has the best solutions, when the problem may need to be rejudged or have data augmented, and to keep people from copying other people's solutions.

#### Sample Input

dmojdmoj
dmoj

#### Sample Output

6
4