Responsive image

Problem J: 数列

Problem J: 数列

Time Limit: 1 Sec  Memory Limit: 128 MB
Submit: 145  Solved: 66
[Submit][Status][Web Board][Creator:]

Description

构造一个无重复的只含有正奇数的数列,使得这个数列所有项之和不超过n。输出所能构造的数列长度的最大值。

Input

多组数据,输入以EOF结尾(不超过1e5组)

每行一个n(1<=n<=1e9)

Output

每行一个数表示构造数列的长度

Sample Input

4
9
10

Sample Output

2
3
3
[Submit][Status]
ACM算法攻关部
  • Anything about this OnlineJudge, Please Contact Administrator. Click add QQ

    OJ system based on HUSTOJ Project , UI based on Twitter Bootstrap

    Copyright 2016 ACM算法攻关部
    关于网站改版