1
0
mirror of https://gitee.com/coder-xiaomo/leetcode-problemset synced 2025-01-11 02:58:13 +08:00
Code Issues Projects Releases Wiki Activity GitHub Gitee
leetcode-problemset/leetcode-cn/problem (Chinese)/动态口令 [zuo-xuan-zhuan-zi-fu-chuan-lcof].html

35 lines
845 B
HTML
Raw Normal View History

2023-12-09 18:53:53 +08:00
<p>某公司门禁密码使用动态口令技术。初始密码为字符串 <code>password</code>,密码更新均遵循以下步骤:</p>
<ul>
<li>设定一个正整数目标值 <code>target</code></li>
<li><code>password</code><code>target</code> 个字符按原顺序移动至字符串末尾</li>
</ul>
<p>请返回更新后的密码字符串。</p>
<p>&nbsp;</p>
<p><strong>示例 1</strong></p>
<pre>
<strong>输入:</strong> password = "s3cur1tyC0d3", target = 4
<strong>输出:</strong> "r1tyC0d3s3cu"
</pre>
<p><strong>示例 2</strong></p>
<pre>
<strong>输入:</strong> password = "lrloseumgh", target = 6
<strong>输出:&nbsp;</strong>"umghlrlose"
</pre>
<p>&nbsp;</p>
<p><strong>提示:</strong></p>
<ul>
<li><code>1 &lt;= target&nbsp;&lt; password.length &lt;= 10000</code></li>
</ul>
<p>&nbsp;</p>