8
Объяснение:
var i:integer;
begin
for i:=1 to 8 do writeln(i);
end.
Вывод:
1
2
3
4
5
6
7
ответ: 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;
8
Объяснение:
var i:integer;
begin
for i:=1 to 8 do writeln(i);
end.
Вывод:
1
2
3
4
5
6
7
8
ответ: 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;
}