結果

問題 No.136 Yet Another GCD Problem
ユーザー snrnsidy
提出日時 2021-05-30 20:13:37
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 394 bytes
コンパイル時間 1,916 ms
コンパイル使用メモリ 192,164 KB
最終ジャッジ日時 2025-01-21 20:47:47
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 14 WA * 25
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h> 

using namespace std;

int main(void)
{
    cin.tie(0);
    ios::sync_with_stdio(false);
    
    int N, K;
    int res = 1;

    cin >> N >> K;

    for (int i = 1; i <= N; i++)
    {
        if (N % i == 0)
        {
            if (N / i >= K)
            {
                res = max(res, i);
            }
        }
    }

    cout << res << '\n';

    return 0;
}
0