結果
| 問題 |
No.192 合成数
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2016-11-19 22:42:32 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 286 bytes |
| コンパイル時間 | 1,517 ms |
| コンパイル使用メモリ | 165,948 KB |
| 実行使用メモリ | 6,944 KB |
| 最終ジャッジ日時 | 2024-06-27 02:05:36 |
| 合計ジャッジ時間 | 2,878 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 25 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
signed main(){
int N; cin >> N;
for( int i = max( 4, N - 100 ); i <= N + 100; ++i ){
int ok = 0;
for( int j = 2; j * j <= i; ++j )
ok |= i % j == 0;
if( ok )
cout << i << endl,
exit( 0 );
}
return 0;
}