F.A.Q
Hand In Hand
Online Acmers
Problem Archive
Realtime Judge Status
Authors Ranklist
 
     C/C++/Java Exams     
ACM Steps
Go to Job
Contest LiveCast
ICPC@China
Best Coder beta
VIP | STD Contests
    DIY | Web-DIY beta
Author ID 
Password 
 Register new ID

KK's Steel

Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others)
Total Submission(s): 1463    Accepted Submission(s): 727


Problem Description
Our lovely KK has a difficult mathematical problem:he has a $N\left( 1\leq N\leq {10}^{18}\right)$ meters steel,he will cut it into steels as many as possible,and he doesn't want any two of them be the same length or any three of them can form a triangle.
 

Input
The first line of the input file contains an integer $T\left( 1\leq T\leq 10\right)$, which indicates the number of test cases.

Each test case contains one line including a integer $N\left( 1\leq N\leq {10}^{18}\right)$,indicating the length of the steel.
 

Output
For each test case, output one line, an integer represent the maxiumum number of steels he can cut it into.
 

Sample Input
1 6
 

Sample Output
3
 

Hint
1+2+3=6 but 1+2=3 They are all different and cannot make a triangle.
 

Source
 

Statistic | Submit | Discuss | Note
Hangzhou Dianzi University Online Judge 3.0
Copyright © 2005-2024 HDU ACM Team. All Rights Reserved.
Designer & Developer : Wang Rongtao LinLe GaoJie GanLu
Total 0.000000(s) query 1, Server time : 2024-04-25 01:00:05, Gzip enabled