結果
問題 | No.308 素数は通れません |
ユーザー |
![]() |
提出日時 | 2015-12-01 06:47:06 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 398 bytes |
コンパイル時間 | 632 ms |
コンパイル使用メモリ | 62,680 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-09-14 06:36:54 |
合計ジャッジ時間 | 2,945 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 97 WA * 10 |
ソースコード
#include <iostream>#include <set>using namespace std;int n;string s;int main(int argc, char *argv[]){cin >> s;n = (s.size() < 3) ? atoi(s.c_str()) : 50;int ans = set<int>({9, 10, 15, 16, 22}).count(n) ? 7 :set<int>({10, 18}).count(n) ? 8 :set<int>({15, 16}).count(n) ? 13 :set<int>({21, 22}).count(n) ? 19 :24 < n ? 8 : n-1;cout << ans << endl;return 0;}