結果

問題 No.136 Yet Another GCD Problem
ユーザー kpinkcat
提出日時 2023-10-31 00:47:56
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 69 ms / 5,000 ms
コード長 406 bytes
コンパイル時間 1,946 ms
コンパイル使用メモリ 193,044 KB
最終ジャッジ日時 2025-02-17 17:05:28
ジャッジサーバーID
(参考情報)
judge3 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 39
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
#include<iostream>
#include<iomanip>
#include<string>
#include<algorithm>
#include<vector>
#include<set>
#include<list>
#include<queue>
#include<math.h>
#include<bitset>
using ll = long long;
using namespace std;


int main(){
    int n, k, ans = 1;
    cin >> n >> k;
    for (int i = 2; i*i <= n; i++) {
        if (!(n%i)) ans = max(ans, n/i); 
    }
    cout << ans << endl;
}
0