标签:main offer ems code return pre http last class
链接:https://leetcode-cn.com/problems/yuan-quan-zhong-zui-hou-sheng-xia-de-shu-zi-lcof/
class Solution {
public:
int lastRemaining(int n, int m) {
if (n == 1) return 0;
return (lastRemaining(n - 1, m) + m ) % n;
}
};
标签:main offer ems code return pre http last class
原文地址:https://www.cnblogs.com/clown9804/p/12491954.html