最快取一个整数最高位的方法

int64_t GetHighest (int64_t num)    //原谅我的渣英文
{
  if(num < 0){
        num *= -1;    
    }

    while (num >= 10) {
        num /= 10;
    }
    return num;
}

方法来源

原文地址:https://www.cnblogs.com/wuOverflow/p/4298352.html