Appearance
#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)