17 lines
324 B
C++
17 lines
324 B
C++
#include <bits/stdc++.h>
|
|
|
|
using namespace std;
|
|
int cnt;
|
|
|
|
int main() {
|
|
int n = 10;
|
|
int u = 1 << n;
|
|
for (int s = 0; s <= u - 1; s++) {
|
|
int q = 4;
|
|
for (int i = n - 1; i >= 0; i--)
|
|
if (s & (1 << i)) q--;
|
|
if (!q)cnt++;
|
|
}
|
|
cout << cnt << endl;
|
|
return 0;
|
|
} |