SBSTR1 - Substring Check (Bug Funny)

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, that the solution may only be submitted in the following languages: Brainf**k, Whitespace and Intercal.

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


Added by:adrian
Date:2004-05-01
Time limit:1s
Source limit:50000B
Memory limit:1536MB
Cluster: Cube (Intel G860)
Languages:BF ICK WHITESPACE

hide comments
2016-05-18 20:13:38
@andy, a bunch of joy that looks like nonsense when you are done.
2016-05-04 05:24:12
What in the hell is Brainfuck language?
2016-04-08 12:14:48
brainfuck language
first time
2016-03-27 18:51:21 Rezaul H Sagar
I've learnt a new language name- "Brainfuck" :p
2016-02-23 16:08:54
coded in java and they Brain*fucked it :P
2016-02-03 16:58:43
Very Easy to solve in Java using contains() function in strings
2016-02-01 08:42:23
So is the challenge supposed to be that you have to use a stupid language?
2015-09-19 19:37:44
OOH NOO! I cannot send my beautiful one line xD
print((0,1)[reduce(lambda a,b: b in a,raw_input().split(" "))])
2015-09-08 10:04:34
Write the code in c/c++ , then realize its not allowed for this problem :P
2015-09-03 19:19:32 harshit sharma
actully...with these types of problems(not allowing all languages) you cant test coding skills...
© Spoj.com. All Rights Reserved. Spoj uses Sphere Engine™ © by Sphere Research Labs.