結果
| 問題 |
No.136 Yet Another GCD Problem
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2018-06-15 18:07:54 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 355 bytes |
| コンパイル時間 | 1,485 ms |
| コンパイル使用メモリ | 166,156 KB |
| 実行使用メモリ | 6,944 KB |
| 最終ジャッジ日時 | 2024-06-30 14:52:26 |
| 合計ジャッジ時間 | 2,548 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 WA * 1 |
| other | AC * 24 WA * 15 |
ソースコード
#include "bits/stdc++.h"
using namespace std;
#define fastcin {\
cin.tie(0);\
ios::sync_with_stdio(false);\
}
#define rep(i, a, b) for(int i = a; i < b; i++)
int main() {
fastcin;
int n, k, ans = 1, sq;
cin >> n >> k;
sq = sqrt(n);
rep(i, 2, sq+1) {
if(n%i==0) ans = n/i;
}
printf("%d\n", ans);
return 0;
}