static int wing=[]()
{
std::ios::sync_with_stdio(false);
cin.tie(NULL);
return ;
}(); class Solution
{
public:
vector<int> constructRectangle(int area)
{
vector<int> res;
int test=sqrt(area);
for(;test>;test--)
{
if(area%test==)
return {area/test,test};
}
}
};

从开方出来的数一个个找

492. Construct the Rectangle的更多相关文章

  1. 【leetcode】492. Construct the Rectangle

    problem 492. Construct the Rectangle 参考 1. Leetcode_492. Construct the Rectangle; 完

  2. LeetCode - 492. Construct the Rectangle

    For a web developer, it is very important to know how to design a web page's size. So, given a speci ...

  3. [LeetCode&Python] Problem 492. Construct the Rectangle

    For a web developer, it is very important to know how to design a web page's size. So, given a speci ...

  4. LeetCode: 492 Construct the Rectangle(easy)

    题目: or a web developer, it is very important to know how to design a web page's size. So, given a sp ...

  5. 【LeetCode】492. Construct the Rectangle 解题报告(Java & Python)

    作者: 负雪明烛 id: fuxuemingzhu 个人博客: http://fuxuemingzhu.cn/ 目录 题目描述 题目大意 解题方法 Java解法 python解法 日期 题目地址:ht ...

  6. 492 Construct the Rectangle 构建矩形

    详见:https://leetcode.com/problems/construct-the-rectangle/description/ C++: class Solution { public: ...

  7. LeetCode——Construct the Rectangle

    LeetCode--Construct the Rectangle Question For a web developer, it is very important to know how to ...

  8. 1209. Construct the Rectangle

    1209. Construct the Rectangle class Solution { public: /** * @param area: web page’s area * @retur ...

  9. [LeetCode] Construct the Rectangle 构建矩形

    For a web developer, it is very important to know how to design a web page's size. So, given a speci ...

随机推荐

  1. Ubuntu jdk 8 与 6 切换 (安装与配置)

    Switch To Oracle JDK8 Switch To Oracle JDK8 1.1 Switch Oracle JDK in the Unbuntu 14.04 Step1 : Downl ...

  2. HtmlRowCreated关于e.Row.Cells[0]的获取和设置

    获取采用:  cmd2.Parameters.AddWithValue("@xh", e.GetValue("学号").ToString().Trim()); ...

  3. windows系统安装参数

    winnt32 /dudisable /s:. /unattend:winnt.sif /makelocalsource /tempdrive:C /syspart:C 以上各参数解释如下: /dud ...

  4. eclipse 乱码

    svn乱码: 教你解决Eclipse中SVN比较乱码问题 workspace->utf-8设置后成功! console乱码: 项目右键 :  run as configuration 设置com ...

  5. 下载google code中源码的几个工具

    Google code 一般以三种命令行方式提供源代码,格式如下: hg clone https://code.google.com/p/xxx/ git clone https://code.goo ...

  6. centos升级python2.7

    http://meiyitianabc.blog.163.com/blog/static/10502212720133192489840/

  7. 两个关于URL解析的例子

    例一: /* 解析URL查寻串中的name=value参数对 将name=value对存储在对象属性中,并返回对象 alert(getQuery().name) */ function getQuer ...

  8. Nginx安装部署以及配置文件解析

    Nginx 中的 Location 指令 是NginxHttpCoreModule中重要指令.Location 指令,是用来为匹配的 URI 进行配置,URI 即语法中的”/uri/”,可以是字符串或 ...

  9. mysql 变量名称不能与表字段一致

    my sql的变量名称不能与表字段名称相同不然会有各种异常问题 啃爹

  10. 第一个gulp程序

    说起来惭愧,一直用公司内部的工具,没有用这些红得发紫的东西.今天东抄西拼终于搞出第一个gulp应用.gulp是做什么的,好处在哪儿我不废话了.直入主题吧. 先在D盘下建立一个xxxx目录,然后打开控制 ...