题解 | #广告屏幕#

广告屏幕

https://ac.nowcoder.com/acm/problem/22213

正方形是矩形!!!

#include <bits/stdc++.h>

using namespace std;

int main()
{
    int n,len = 0,res = 1;
    cin >> n;
    for(int i = 1; i <= (int)sqrt(n); i++)
    {
        if(n%i == 0) res = max(res,i);
    }
    cout << res << " " << n/res << endl;
    return 0;
}
全部评论

相关推荐

评论
点赞
收藏
分享

创作者周榜

更多
牛客网
牛客网在线编程
牛客网题解
牛客企业服务