eolymp
bolt
Try our new interface for solving problems
Problems

Conditional statement - 1

Conditional statement - 1

Find the value of $y$ according to the following condition: $$ y = \begin{cases} x^2 - 3x + 4, x < 5 \\ x + 7, x \ge 5 \end{cases} $$ \InputFile One integer $x\:(-1000 \le x \le 1000)$. \OutputFile Print the value of $y$ according to the given condition.
Time limit 1 second
Memory limit 128 MiB
Input example #1
2
Output example #1
2
Input example #2
10
Output example #2
17