Skip to content

Latest commit

 

History

History
34 lines (21 loc) · 571 Bytes

File metadata and controls

34 lines (21 loc) · 571 Bytes

Input()

https://www.hackerrank.com/challenges/input

Problem

In Python 2, the expression input() is equivalent to eval(raw _input(prompt)).

Task

You are given a polynomial P of a single indeterminate (or variable), x.
You are also given the values of x and k. Your task is to verify if P(x) = k.

Input Format

The first line contains the space separated values of x and k.
The second line contains the polynomial P.

Sample Input 0

1 4
x**3 + x**2 + x + 1

Sample Output 0

True

My Solution