Skip to content
On this page

d62_q2c_wasted_space.cpp

cpp
#include <cmath>
#include <iostream>

int main() {
    int n;
    std::cin >> n;

    std::cout << static_cast<int>(std::pow(2, std::ceil(std::log2(n))) - n)
              << "\n";
}

See on GitHub

Last Updated: 15/1/2567 13:25:21 (UTC+7)

Released under the MIT License