結果
| 問題 |
No.136 Yet Another GCD Problem
|
| コンテスト | |
| ユーザー |
momoyuu
|
| 提出日時 | 2023-10-08 18:08:02 |
| 言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 3 ms / 5,000 ms |
| コード長 | 303 bytes |
| コンパイル時間 | 2,795 ms |
| コンパイル使用メモリ | 243,664 KB |
| 実行使用メモリ | 6,944 KB |
| 最終ジャッジ日時 | 2024-07-26 18:10:39 |
| 合計ジャッジ時間 | 3,961 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 39 |
ソースコード
#include<bits/stdc++.h>
using namespace std;
using ll = long long;
int main(){
cin.tie(nullptr);
ios::sync_with_stdio(false);
int ans = 1;
int n,k;
cin>>n>>k;
for(int i = 1;i<=n;i++){
if(n%i!=0) continue;
if((long)i*2<=n) ans = i;
}
cout<<ans<<endl;
}
momoyuu