long long unsigned intToUnsigned (const int& i) { return static_cast<long long unsigned>(i >= 0 ? i : (i + pow (2.0, 32.0))); } int UnsignedToInt (const long long unsigned& u) { auto limit = static_cast<long long unsigned>(pow(2.0, 32.0)); return static_cast<int>(limit < u? (u - limit) : u); }
时间: 2025-01-02 03:31:24