#include
#include
#include
#include
#include
using namespace std;
void solve() {
int n = 1000000000;
long long ans = n;
ans = (ans * (ans + 1)) / 2;
long i{0};
while(true) {
const auto num = pow(2, i++);
if(num > n) {
break;
}
cout
Подробнее здесь: [url]https://stackoverflow.com/questions/78479923/getting-wrong-output-after-simple-subtraction[/url]