Submit | All submissions | Best solutions | Back to list |
BRHQUADR - Quadratics |
Butch needs help with checking his math homework. He is studying quadratic equations, which are in the form
y = ax2+bx+c
He wants to give you a, b, c, and x (1 ≤ a, b, c, x ≤ 10), and asks you to find y.
Input
Line 1: Three space-separated integers, a, b, and c.
Line 2: A single integer, x.
Output
Line 1: A single integer, y
Example
Input:
2 5 3
-4
Output: 15
Added by: | Damon Doucet |
Date: | 2009-11-02 |
Time limit: | 1s |
Source limit: | 50000B |
Memory limit: | 1536MB |
Cluster: | Cube (Intel G860) |
Languages: | All except: ASM64 NODEJS OBJC PERL6 SQLITE VB.NET |
hide comments
2017-06-04 07:25:05
The constraints are wrong, 1 <= x <= 10. But its written in example x is -4. |
|
2013-08-11 03:57:36 Vaibhav Yenamandra
This can easily be moved to tutorial |
|
2011-12-20 18:09:41 Bharath Reddy
Hey, no points even if we score 100 points in this problem? |