結果
問題 | No.3023 素数判定するだけ |
ユーザー | izryt(趣味) |
提出日時 | 2017-04-01 00:08:17 |
言語 | C++14 (gcc 12.3.0 + boost 1.83.0) |
結果 |
WA
(最新)
AC
(最初)
|
実行時間 | - |
コード長 | 4,678 bytes |
コンパイル時間 | 536 ms |
コンパイル使用メモリ | 64,520 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-07-16 00:36:18 |
合計ジャッジ時間 | 4,922 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 2 ms
6,816 KB |
testcase_01 | AC | 2 ms
6,944 KB |
testcase_02 | AC | 2 ms
6,940 KB |
testcase_03 | AC | 2 ms
6,940 KB |
testcase_04 | AC | 2 ms
6,940 KB |
testcase_05 | AC | 2 ms
6,940 KB |
testcase_06 | AC | 2 ms
6,940 KB |
testcase_07 | AC | 2 ms
6,940 KB |
testcase_08 | AC | 2 ms
6,944 KB |
testcase_09 | AC | 2 ms
6,944 KB |
testcase_10 | AC | 2 ms
6,940 KB |
testcase_11 | AC | 2 ms
6,940 KB |
testcase_12 | AC | 2 ms
6,944 KB |
testcase_13 | AC | 2 ms
6,944 KB |
testcase_14 | AC | 2 ms
6,944 KB |
testcase_15 | AC | 2 ms
6,940 KB |
testcase_16 | AC | 2 ms
6,940 KB |
testcase_17 | AC | 2 ms
6,940 KB |
testcase_18 | AC | 2 ms
6,944 KB |
testcase_19 | AC | 2 ms
6,940 KB |
testcase_20 | AC | 2 ms
6,940 KB |
testcase_21 | AC | 2 ms
6,940 KB |
testcase_22 | AC | 2 ms
6,940 KB |
testcase_23 | WA | - |
testcase_24 | WA | - |
ソースコード
#include <iostream> using namespace std; int zero = (int)false; int one = (int)true; int two = (one << (one << zero)) | zero; int three = (one << zero) | (one << (one << zero)) | zero; int four = (one << (one << (one << zero))) | zero; int five = (one << zero) | (one << (one << (one << zero))) | zero; int six = (one << (one << zero)) | (one << (one << (one << zero))) | zero; int seven = (one << zero) | (one << (one << zero)) | (one << (one << (one << zero))) | zero; int eight = (one << (one << (one << (one << zero)))) | zero; int nine = (one << zero) | (one << (one << (one << (one << zero)))) | zero; int ten = (one << (one << zero)) | (one << (one << (one << (one << zero)))) | zero; int eleven = (one << zero) | (one << (one << zero)) | (one << (one << (one << (one << zero)))) | zero; int twelve = (one << (one << (one << zero))) | (one << (one << (one << (one << zero)))) | zero; int thirteen = (one << zero) | (one << (one << (one << zero))) | (one << (one << (one << (one << zero)))) | zero; int fourteen = (one << (one << zero)) | (one << (one << (one << zero))) | (one << (one << (one << (one << zero)))) | zero; int fifteen = (one << zero) | (one << (one << zero)) | (one << (one << (one << zero))) | (one << (one << (one << (one << zero)))) | zero; int sixteen = (one << (one << (one << (one << (one << zero))))) | zero; int seventeen = (one << zero) | (one << (one << (one << (one << (one << zero))))) | zero; int eighteen = (one << (one << zero)) | (one << (one << (one << (one << (one << zero))))) | zero; int nineteen = (one << zero) | (one << (one << zero)) | (one << (one << (one << (one << (one << zero))))) | zero; int twenty = (one << (one << (one << zero))) | (one << (one << (one << (one << (one << zero))))) | zero; int twentyone = (one << zero) | (one << (one << (one << zero))) | (one << (one << (one << (one << (one << zero))))) | zero; int twentytwo = (one << (one << zero)) | (one << (one << (one << zero))) | (one << (one << (one << (one << (one << zero))))) | zero; int twentythree = (one << zero) | (one << (one << zero)) | (one << (one << (one << zero))) | (one << (one << (one << (one << (one << zero))))) | zero; int twentyfour = (one << (one << (one << (one << zero)))) | (one << (one << (one << (one << (one << zero))))) | zero; int twentyfive = (one << zero) | (one << (one << (one << (one << zero)))) | (one << (one << (one << (one << (one << zero))))) | zero; int twentysix = (one << (one << zero)) | (one << (one << (one << (one << zero)))) | (one << (one << (one << (one << (one << zero))))) | zero; int twentyseven = (one << zero) | (one << (one << zero)) | (one << (one << (one << (one << zero)))) | (one << (one << (one << (one << (one << zero))))) | zero; int twentyeight = (one << (one << (one << zero))) | (one << (one << (one << (one << zero)))) | (one << (one << (one << (one << (one << zero))))) | zero; int twentynine = (one << zero) | (one << (one << (one << zero))) | (one << (one << (one << (one << zero)))) | (one << (one << (one << (one << (one << zero))))) | zero; int thirty = (one << (one << zero)) | (one << (one << (one << zero))) | (one << (one << (one << (one << zero)))) | (one << (one << (one << (one << (one << zero))))) | zero; int thirtyone = (one << zero) | (one << (one << zero)) | (one << (one << (one << zero))) | (one << (one << (one << (one << zero)))) | (one << (one << (one << (one << (one << zero))))) | zero; int thirtytwo = (one << (one << (one << (one << (one << (one << zero)))))) | zero; int thirtythree = (one << zero) | (one << (one << (one << (one << (one << (one << zero)))))) | zero; int thirtyfour = (one << (one << zero)) | (one << (one << (one << (one << (one << (one << zero)))))) | zero; int main() { int n; cin >> n; if (n == one) { cout << "NO\n"; return zero; } if (n % two == zero && n != two) { cout << "NO\n"; return zero; } if (n % three == zero && n != three) { cout << "NO\n"; return zero; } if (n % five == zero && n != five) { cout << "NO\n"; return zero; } if (n % seven == zero && n != seven) { cout << "NO\n"; return zero; } if (n % eleven == zero && n != eleven) { cout << "NO\n"; return zero; } if (n % thirteen == zero && n != thirteen) { cout << "NO\n"; return zero; } if (n % seventeen == zero && n != seventeen) { cout << "NO\n"; return zero; } if (n % nineteen == zero && n != nineteen) { cout << "NO\n"; return zero; } if (n % twentythree == zero && n != twentythree) { cout << "NO\n"; return zero; } if (n % twentynine == zero && n != twentynine) { cout << "NO\n"; return zero; } if (n % thirtyone == zero && n != thirtyone) { cout << "NO\n"; return zero; } cout << "YES\n"; }