fork download
  1. #include <bits/stdc++.h>
  2.  
  3. using namespace std;
  4.  
  5. int second(int a, int b){
  6. return (a + b * 2 >= 62) or (a * 2 + b >= 62);
  7. }
  8.  
  9. int first(int a, int b){
  10. return (second(a + 3, b) or second(a, b + 3) or second(a * 2, b) or second(a, b * 2)) and !second(a, b);
  11. }
  12.  
  13. int main() {
  14. for (int i = 0; i < 100; i++){
  15. if (first(7, i)){
  16. cout << i << endl;
  17. }
  18. }
  19. }
Success #stdin #stdout 0s 5408KB
stdin
Standard input is empty
stdout
14
15
16
17
18
19
20
21
22
23
24
25
26
27