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. cb6xe7代码提示风格变化

  2. mysql使用一条sql删除多条数据

    使用in delete from course where chour in(55,56,57); course:表名 chour:字段 55,56,57数据

  3. c++ vector, 迭代器

    现代c++尽量使用vector(容器)和迭代器(相当于指针),少使用数组和指针,除非对程序执行效率有很高的要求. 容器优点,易于扩展,可通过push_back方法动态添加元素,数组不能动态添加元素. ...

  4. Haskell语言学习笔记(67)Gtk2Hs

    Gtk2Hs $ brew cask install xquartz $ brew install glib cairo gtk gettext fontconfig freetype $ expor ...

  5. Java Magic. Part 2: 0xCAFEBABE

    Java Magic. Part 2: 0xCAFEBABE @(Base)[JDK, magic, 黑魔法] 转载请写明:原文地址 英文原文 系列文章: -Java Magic. Part 1: j ...

  6. 常见jsp跳转总结

    这次做项目,用到几种不同的JSP跳转的方式,在此总结5中常用方法. 常用的跳转方式有以下几种: (1)href超链接标记,属于客户端跳转 (2)使用javascript完成,属于客户端跳转 (3)提交 ...

  7. $.ajax dataType设置为json 回调函数不执行

    请求方式如下: $.xpost = function (url, data) { return $.ajax({ url: url, type: "POST", dataType: ...

  8. t检验,T Test (Student’s T-Test)

    1.什么是T test? t-test:比较数据的均值,告诉你这两者之间是否相同,并给出这种不同的显著性(即是否是因为偶然导致的不同) The t test (also called Student’ ...

  9. xshell分隔符

    1.分隔符设置 \ :;`!@#$%^&()+|[]{}'",<>? 2.左键点击选中,右键点击复制

  10. mysql连接数据库存报下面错误:ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)

    输入 mysql -u root 登录 mysql 的时候出现以下错误: ERROR 2002 (HY000): Can't connect to local MySQL server through ...