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. SAP PP中关于工单报工的小解

    一般来说工单确认的方法很多,这里就简要介绍下几种常见的报工方法: 1.co11n 是大家常用的方法之一,也是比较好用,产量,报废,返工,工时,货物移动都可以输入.介于我们公司的业务我们用这个报工是最多 ...

  2. WDA-WebDynpro Demo & FPM Demo

    Web Dynpro Demo package: SWDP_DEMO SWDP_TEST   FPM Demo package: APB_FPM_DEMO APB_FPM_DEMO_SCENARIO

  3. heat 用法 示例

    heat.exe dir "./SampleFolder" -cg Files -dr INSTALLDIR -gg -g1 -sf -srd -var "var.Tar ...

  4. spring boot 测试类

    import org.junit.Test;import org.junit.runner.RunWith;import org.slf4j.Logger;import org.slf4j.Logge ...

  5. JavaScript 累加求和练习 函数

    输入一个数,求从1加到这个数的和 主要代码: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" & ...

  6. Containerpilot 配置文件 之 Telemetry

    如果提供telemetry选项,ContainerPilot将公开可用于刮擦性能telemetry的Prometheus HTTP客户端界面. telemetry接口被公告为consul服务. tel ...

  7. Linux就业技术指导(一):简历撰写及面试筹备要领

    一,开场 二,模型 三,目标选材 3.1 什么是目标选材 简单说就是确定一个候选人是否符合某一个工作岗位要求的整个流程.这是对招聘方的一个培训,应聘方如果掌握了,就知道应该怎样正确的去应聘工作. 3. ...

  8. 第五章 二叉树(d)二叉树实现

  9. sqlserver 字符串拆分和取某分隔符之前的字符串

    ALTER FUNCTION [dbo].[f_splitSTR]( ), --待分拆的字符串 ) --数据分隔符 )RETURNS @re TABLE( col varchar(max)) AS B ...

  10. iOS - OC - 字典快速遍历

    1. [dic enumerateKeysAndObjectsUsingBlock:^(id  _Nonnull key, id  _Nonnull obj, BOOL * _Nonnull stop ...