結果

問題 No.136 Yet Another GCD Problem
ユーザー ふう
提出日時 2015-01-26 00:46:34
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
AC  
実行時間 2 ms / 5,000 ms
コード長 500 bytes
コンパイル時間 903 ms
コンパイル使用メモリ 81,012 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-06-23 03:08:42
合計ジャッジ時間 1,700 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 39
権限があれば一括ダウンロードができます

ソースコード

diff #

#define _CRT_SECURE_NO_WARNINGS
#define _USE_MATH_DEFINES
#include <iostream>
#include <map>
#include <list>
#include <cstdio>
#include <cmath>
#include <cstring>
#include <string>
#include <vector>
#include <algorithm>
#include <utility>
#include <queue>
#include <iomanip>

using namespace std;

int main(void)
{
	int n, k;
	int cnt = 0;
	int res = 1;

	cin >> n >> k;
	
	for (int i = 2; i <= n; i++) {
		if (n % i == 0) {
			res = n / i;
			break;
		}
    }

	cout << res << endl;

	return (0);
}
0