0.SVMC 2017 BSTR1-Substring Check (Bug Funny)


Submit solution

Points: 1
Time limit: 1.0s
Memory limit: 10M

Author:
Problem type

Given two binary strings, A (of length 10) and B (of length 5), output 1 if B is a substring of A and 0 otherwise.

Please note, you can read the inputs 24 line or until at the end of file (EOF) and write the output each result in one line.

Input

24 lines consisting of pairs of binary strings A and B separated by a single space.

Output

The logical value of: 'B is a substring of A'.

Example

First two lines of input:

1010110010 10110

1110111011 10011

First two lines of output:

1

0


Comments

There are no comments at the moment.