結果
| 問題 |
No.136 Yet Another GCD Problem
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2015-01-25 23:32:26 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 5,000 ms |
| コード長 | 328 bytes |
| コンパイル時間 | 624 ms |
| コンパイル使用メモリ | 54,108 KB |
| 実行使用メモリ | 5,376 KB |
| 最終ジャッジ日時 | 2024-06-23 02:55:15 |
| 合計ジャッジ時間 | 1,325 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 39 |
ソースコード
#include<iostream>
using namespace std;
int N;
void read() {
int K;
cin >> N >> K;
}
void work() {
for (int i = 2; i * i <= N; ++i) {
if (N % i == 0) {
cout << N / i << endl;
return;
}
}
cout << 1 << endl;
}
int main() {
read();
work();
return 0;
}