跳至主要内容

172. 阶乘后的零

class Solution {
public:
    int trailingZeroes(int n) {
        int total = 0;
        while (n >= 1)
        {
            n /= 5;
            total += n;
        }
        return total;
    }
};

评论

此博客中的热门博文

shadowsocks android编译

git clone https://github.com/shadowsocks/shadowsocks-android.git cd shadowsocks-android git submodule update --init --recursive chmod a+rwx ./ -R docker run --rm -v ${PWD}:/build -w /build shadowsocks/android-ndk-go ./gradlew assembleDebug