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. bean-json-bean-json 工具

    package com.taotao.utils; import java.util.List; import com.fasterxml.jackson.core.JsonProcessingExc ...

  2. JAVA 常用注解( JDK, Spring, AspectJ )

    JDK自带注解   @Override   表示当前方法覆盖了父类的方法   @Deprecation   表示方法已经过时,方法上有横线,使用时会有警告   @SuppviseWarnings    ...

  3. VBA 调用DLL动态链接库

    在ArcMap中引用动态链接库       我在VB6下编译生成了一个动态链接库文件VBAPrj.dll,其中有一类模块VBACls,此类模块有一个方法Test(Doc As Object).     ...

  4. Select Case 的简单实现

    FOR %%f in (1,3,5,7,) do if errorlevel == %%f goto CASE%%f        echo                    ERROR      ...

  5. 机器学习入门-数据过采样(上采样)1. SMOTE

    from imblearn.over_sampling import SMOTE  # 导入 overstamp = SMOTE(random_state=0) # 对训练集的数据进行上采样,测试集的 ...

  6. 生产者和消费者模式--java设计模式

    生产者和消费者: 就犹如在快餐店点餐一样,有多个打饭的,有不定时的人来买饭,买饭的人从快餐店自动取餐,如果快餐的库存数量达到下限值时,自动启动打饭的,补充盒饭. 通过while循环的方式,传入变量is ...

  7. mysql之explain

    ⊙ 使用EXPLAIN语法检查查询执行计划   ◎ 查看索引的使用情况   ◎ 查看行扫描情况   ⊙ 避免使用SELECT *   ◎ 这会导致表的全扫描   ◎ 网络带宽会被浪费   话说工欲善其 ...

  8. Python环境配置, atom-python配置

    环境变量 路径 在window下配置环境变量,配置到文件夹级就可以了: D:\program\python3 编码 因为windows默认的编码是ASIIC,所以使用atom时候中文是乱码,需要在环境 ...

  9. CSS3 弹性盒模型 box-flex

    说明:本文档兼容性测试基础环境为:windows系统:IE6-IE10, Firefox6.0, Chrome13.0, Safari5.1, Opera11.51 语法: box-flex:< ...

  10. 关于number...的精度问题

    一 当数字的精度被定为number(3,2)时, 这时他能输入的数字整数部分只能是3-2=1位, 小数位如果不够会用0补齐, 超出的四舍五入保留3位小数. SQL> insert into t_ ...