diff --git a/solution/1700-1799/1797.Design Authentication Manager/README.md b/solution/1700-1799/1797.Design Authentication Manager/README.md
index 00d37d86c630f..da1057b68c772 100644
--- a/solution/1700-1799/1797.Design Authentication Manager/README.md
+++ b/solution/1700-1799/1797.Design Authentication Manager/README.md
@@ -25,7 +25,7 @@
输入: -["AuthenticationManager", "-renew
", "generate", "countUnexpiredTokens
", "generate", "renew
", "renew
", "countUnexpiredTokens
"] +["AuthenticationManager", "renew", "generate", "countUnexpiredTokens", "generate", "renew", "renew", "countUnexpiredTokens"] [[5], ["aaa", 1], ["aaa", 2], [6], ["bbb", 7], ["aaa", 8], ["bbb", 10], [15]] 输出: [null, null, null, 1, null, null, null, 0] @@ -42,8 +42,6 @@ authenticationManager.countUnexpiredTokens
(15); // tokenId 为 "bbb
-
提示:
Input -["AuthenticationManager", "diff --git a/solution/config.py b/solution/config.py index 950c1f7f6a96c..23cd460724f74 100644 --- a/solution/config.py +++ b/solution/config.py @@ -46,6 +46,7 @@ 1717, 1754, 1760, + 1797, 1850, 1891, 1899,renew
", "generate", "countUnexpiredTokens
", "generate", "renew
", "renew
", "countUnexpiredTokens
"] -[[5], ["aaa", 1], ["aaa", 2], [6], ["bbb", 7], ["aaa", 8], ["bbb", 10], [15]] +["AuthenticationManager", "renew", "generate", "countUnexpiredTokens", "generate", "renew", "renew", "countUnexpiredTokens"] +[[5], ["aaa", 1], ["aaa", 2], [6], ["bbb", 7], ["aaa", 8], ["bbb", 10], [15]] Output [null, null, null, 1, null, null, null, 0] Explanation AuthenticationManager authenticationManager = new AuthenticationManager(5); // Constructs the AuthenticationManager withtimeToLive
= 5 seconds. -authenticationManager.renew
("aaa", 1); // No token exists with tokenId "aaa" at time 1, so nothing happens. -authenticationManager.generate("aaa", 2); // Generates a new token with tokenId "aaa" at time 2. -authenticationManager.countUnexpiredTokens
(6); // The token with tokenId "aaa" is the only unexpired one at time 6, so return 1. -authenticationManager.generate("bbb", 7); // Generates a new token with tokenId "bbb" at time 7. -authenticationManager.renew
("aaa", 8); // The token with tokenId "aaa" expired at time 7, and 8 >= 7, so at time 8 therenew
request is ignored, and nothing happens. -authenticationManager.renew
("bbb", 10); // The token with tokenId "bbb" is unexpired at time 10, so therenew
request is fulfilled and now the token will expire at time 15. -authenticationManager.countUnexpiredTokens
(15); // The token with tokenId "bbb" expires at time 15, and the token with tokenId "aaa" expired at time 7, so currently no token is unexpired, so return 0. +authenticationManager.renew
("aaa", 1); // No token exists with tokenId "aaa" at time 1, so nothing happens. +authenticationManager.generate("aaa", 2); // Generates a new token with tokenId "aaa" at time 2. +authenticationManager.countUnexpiredTokens
(6); // The token with tokenId "aaa" is the only unexpired one at time 6, so return 1. +authenticationManager.generate("bbb", 7); // Generates a new token with tokenId "bbb" at time 7. +authenticationManager.renew
("aaa", 8); // The token with tokenId "aaa" expired at time 7, and 8 >= 7, so at time 8 therenew
request is ignored, and nothing happens. +authenticationManager.renew
("bbb", 10); // The token with tokenId "bbb" is unexpired at time 10, so therenew
request is fulfilled and now the token will expire at time 15. +authenticationManager.countUnexpiredTokens
(15); // The token with tokenId "bbb" expires at time 15, and the token with tokenId "aaa" expired at time 7, so currently no token is unexpired, so return 0.