結果
問題 |
No.136 Yet Another GCD Problem
|
ユーザー |
![]() |
提出日時 | 2015-06-13 13:58:24 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 2 ms / 5,000 ms |
コード長 | 367 bytes |
コンパイル時間 | 652 ms |
コンパイル使用メモリ | 73,312 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-07-06 18:41:13 |
合計ジャッジ時間 | 1,699 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 39 |
ソースコード
#include <iostream> #include <algorithm> #include <vector> #include <string> #include <cmath> #include <iomanip> #include <map> using namespace std; typedef long long LL; int main(){ int N, K; cin >> N >> K; int ans = 1; for(int i = 2; i < N; i++){ if(N % i == 0){ ans = i; } } cout << ans << endl; return 0; }