結果
| 問題 |
No.136 Yet Another GCD Problem
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2018-08-15 15:41:48 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 5,000 ms |
| コード長 | 402 bytes |
| コンパイル時間 | 1,483 ms |
| コンパイル使用メモリ | 167,156 KB |
| 実行使用メモリ | 6,944 KB |
| 最終ジャッジ日時 | 2024-09-24 09:24:53 |
| 合計ジャッジ時間 | 2,663 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 39 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const long mod = 1e9 + 7;
int main(void) {
#ifdef DEBUG
freopen("input.txt", "r", stdin);
#endif
ios_base::sync_with_stdio(false);
cin.tie(NULL);
long N, K;
cin >> N >> K;
long ans = 0;
for (long i = N / 2; i > 0; i--) {
if (!(N % i)) {
ans = i;
break;
}
}
cout << ans << endl;
return 0;
}