Input Format
The first line contains the space separated values of  and .
The second line contains the polynomial .
Output Format
Print True if . Otherwise, print False.

Hackerrank input problem solution in python

Problem solution in python 2 programming language.

x,k = map(int, raw_input().split())
print input() == k

Problem solution in python 3 programming language.

# Enter your code here. Read input from STDIN. Print output to STDOUT
ui = input().split()
x = int(ui[0])
print(eval(input()) == int(ui[1]))