题目链接 1006. 笨阶乘 class Solution { public: int clumsy(int N) { std::ios::sync_with_stdio(false); if(N <= 4){ int res[] = {0, 1, 2, 6, 7}; return res[N]; }else{ int res[] = {1, 2, 2, -1}; return N + res[N % 4]; } } };