結果

問題 No.136 Yet Another GCD Problem
ユーザー koba-e964
提出日時 2015-04-30 18:35:53
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
AC  
実行時間 2 ms / 5,000 ms
コード長 755 bytes
コンパイル時間 663 ms
コンパイル使用メモリ 85,664 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-07-05 17:12:35
合計ジャッジ時間 1,758 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 39
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <algorithm>
#include <bitset>
#include <cassert>
#include <cctype>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <utility>
#include <vector>

#define REP(i,s,n) for(int i=(int)(s);i<(int)(n);i++)

using namespace std;
typedef long long int ll;
typedef vector<int> VI;
typedef pair<int, int> PI;
const double EPS=1e-9;



int main(void){
  int n, k;
  cin >> n >> k;
  int md = 2;
  while(1) {
    if (n % md == 0) {
      break;
    }
    md++;
  }
  cout << (n / md) << endl;
}
0