你需要设计一个包含验证码的验证系统。每一次验证中,用户会收到一个新的验证码,这个验证码在 currentTime 时刻之后 timeToLive 秒过期。如果验证码被更新了,那么它会在 currentTime (可能与之前的 currentTime 不同)时刻延长 timeToLive 秒。
请你实现 AuthenticationManager 类:
来源:力扣(LeetCode)
链接:https://leetcode.cn/problems/design-authentication-manager
著作权归领扣网络所有。商业转载请联系官方授权,非商业转载请注明出处。
莫名其妙的一道题,题干描述莫名其妙,通过的也莫名其妙,没啥营养,也不知道有啥优化方法。
1 | class AuthenticationManager(object): |