結果
問題 | No.136 Yet Another GCD Problem |
ユーザー |
|
提出日時 | 2018-06-15 18:09:03 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 5,000 ms |
コード長 | 398 bytes |
コンパイル時間 | 1,490 ms |
コンパイル使用メモリ | 165,680 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-06-30 14:52:34 |
合計ジャッジ時間 | 2,716 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 39 |
ソースコード
#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; break; } } printf("%d\n", ans); return 0; }