307800: CF1419B. Stairs
Memory Limit:256 MB
Time Limit:1 S
Judge Style:Text Compare
Creator:
Submit:0
Solved:0
Description
Stairs
题意翻译
题目给出 $ t $ 组数据,对于每一组数据: 把呈阶梯状的图形称为“阶梯”,把最长边为 $ X $ 的阶梯称为“X级阶梯”。如图是一个7级阶梯。如果一个“X级阶梯”可被 $ X $ 个边长为正整数的正方形恰好覆盖,那么称之为“好阶梯”。 现有 $ n $ 个边长为 $ 1 $ 的正方形,问最多可以搭出多少个不同的“好阶梯”?题目描述
Jett is tired after destroying the town and she wants to have a rest. She likes high places, that's why for having a rest she wants to get high and she decided to craft staircases. Staircase is a squared figure that consists of square cells. Each staircase consists of an arbitrary number of stairs. If a staircase has $ n $ stairs, then it is made of $ n $ columns, the first column is $ 1 $ cell high, the second column is $ 2 $ cells high, $ \ldots $ , the $ n $ -th column if $ n $ cells high. The lowest cells of all stairs must be in the same row. A staircase with $ n $ stairs is called nice, if it may be covered by $ n $ disjoint squares made of cells. All squares should fully consist of cells of a staircase. This is how a nice covered staircase with $ 7 $ stairs looks like: ![](https://cdn.luogu.com.cn/upload/vjudge_pic/CF1419B/20e8f39717a3a82bb8f73bd6c4f499217c03a037.png)Find out the maximal number of different nice staircases, that can be built, using no more than $ x $ cells, in total. No cell can be used more than once.输入输出格式
输入格式
The first line contains a single integer $ t $ $ (1 \le t \le 1000) $ — the number of test cases. The description of each test case contains a single integer $ x $ $ (1 \le x \le 10^{18}) $ — the number of cells for building staircases.
输出格式
For each test case output a single integer — the number of different nice staircases, that can be built, using not more than $ x $ cells, in total.
输入输出样例
输入样例 #1
4
1
8
6
1000000000000000000
输出样例 #1
1
2
1
30