結果
| 問題 |
No.192 合成数
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2016-11-19 22:42:10 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 290 bytes |
| コンパイル時間 | 2,209 ms |
| コンパイル使用メモリ | 166,136 KB |
| 実行使用メモリ | 6,824 KB |
| 最終ジャッジ日時 | 2024-11-27 06:22:24 |
| 合計ジャッジ時間 | 6,162 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | WA * 2 |
| other | WA * 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 ng = 0;
for( int j = 2; j * j <= i; ++j )
ng |= i % j == 0;
if( not ng )
cout << i << endl,
exit( 0 );
}
return 0;
}