_takumi

num15

Oct 18th, 2020
570
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. bool impl(bool a, bool b) {
  5.     return !a || b;
  6. }
  7.  
  8. bool F(int a, int x) {
  9.     return impl(x&25!=0, impl(x&19 == 0, x & a != 0));
  10. }
  11.  
  12. int main() {
  13.     int cnt = 5000, ans = 1;
  14.     for (int a = 8; a < cnt; a++) {
  15.         for (int x = 1; x < cnt; x++) {
  16.             if (F(a, x) == 0) {
  17.                 break;
  18.             }
  19.             else if (x == cnt - 1) {
  20.                 cout << a;
  21.                 exit(0);
  22.             }
  23.         }
  24.     }
  25.     return 0;
  26. }
RAW Paste Data