TopCoder

User's AC Ratio

100.0% (1/1)

Submission's AC Ratio

100.0% (1/1)

Tags

Description

The problem is as hard as that teaching assistant(s) can't solve.

The problem description is quite simple, but unfortunately the solution is unpredictable hard.

Let $f(x) = \text{floor}(3((\ln x)+3)^ 3)$, for a given $N$, your task is to compute the minimum integer $x$ such that $f(x) = N$.

Input Format

The first line of the input contains an integer $T$, where $T$ is the number of the testcase.

There are following $T$ lines, each line of the input contains one integer $N$, where $0 \leq N \leq 40000$

Output Format

For each testcase, output a minimum integer $x$ such that $f(x) = N$.

If there is no such $x$, output BEE instead of the error.

Sample Input 1

2
10
81

Sample Output 1

BEE
1

Hints

If you questioned the hardness of the problem, please contacts the (ex-)Teaching Assistant.

Problem Source

Migrated from old NTUJ.

Kind TAs

Subtasks

No. Testdata Range Score

Testdata and Limits

No. Time Limit (ms) Memory Limit (VSS, KiB) Output Limit (KiB) Subtasks
0 1000 65536 200