ответ: 15
Прога:
/** libraries */
#include <iostream>
#include <cmath>
#include <vector>
#include <map>
#include <set>
#include <queue>
#include <stack>
#include <algorithm>
using namespace std;
/** defines */
#define ll long long
#define ld long double
#define yes cout << "YES" << "\n"
#define no cout << "NO" << "\n"
ll f(ll num){
ll res = 0;
while(num > 0){
res += 1 - num % 2;
num /= 2;
}
return res;
signed main() {
ios_base::sync_with_stdio(false);
cin.tie(nullptr);
cout.tie(nullptr);
ll ans = 0;
for(ll i = 27; i <= 53; i++)
if(f(i) >= 3)
ans++;
cout << ans;
ответ: 15
Прога:
/** libraries */
#include <iostream>
#include <cmath>
#include <vector>
#include <map>
#include <set>
#include <queue>
#include <stack>
#include <algorithm>
/** libraries */
using namespace std;
/** defines */
#define ll long long
#define ld long double
#define yes cout << "YES" << "\n"
#define no cout << "NO" << "\n"
/** defines */
ll f(ll num){
ll res = 0;
while(num > 0){
res += 1 - num % 2;
num /= 2;
}
return res;
}
signed main() {
ios_base::sync_with_stdio(false);
cin.tie(nullptr);
cout.tie(nullptr);
ll ans = 0;
for(ll i = 27; i <= 53; i++)
if(f(i) >= 3)
ans++;
cout << ans;
}