You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

17 lines
324 B

#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;
}