EQUU2 - Again Equation
Let us define f(x) =3x2+2x+7.
You are given an integer P. You have to find the smallest positive integer of x(x>=0) such that f(x) ≥P.
Input
Input starts with an integer T (≤ 100), denoting the number of test cases.
Each case contains an integer P (1<=P<=9*1018).
Output
For each test case, print the case number and the required answer.
Sample Input |
Output for Sample Input |
2 92 91 |
Case 1: 5 Case 2: 5 |
Problem Setter: Md Abdul Alim, Dept. of Computer Science, Bangladesh University of Business & Technology
hide comments
Francky:
2014-03-07 17:00:31
Warning, here positive means >=0, not >0. It should be clearer in description, definition depend on country!
|
Added by: | Alim |
Date: | 2014-03-03 |
Time limit: | 1s |
Source limit: | 50000B |
Memory limit: | 1536MB |
Cluster: | Cube (Intel G860) |
Languages: | All except: ASM64 GOSU |
Resource: | Own Problem |