- 注册时间
- 2011-9-30
- 最后登录
- 1970-1-1
- 威望
- 星
- 金币
- 枚
- 贡献
- 分
- 经验
- 点
- 鲜花
- 朵
- 魅力
- 点
- 上传
- 次
- 下载
- 次
- 积分
- 45
- 在线时间
- 小时
|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?欢迎注册
×
Given an big integer N, how to judge that whether there exists an integer m where N=m*m with O(1) time complexity.
For example, for the number 9, there exists an integer 3 that 3*3=9.
For the number 18, we cannot find the proper number.
PS: MUST BE O(1) time complexity , which means your method can be done in constant step no matter how big the number N is.
MUST TAKE IT INTO CONSIDERATION that N is a very very large integer. |
|