GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • 注册
  • Plus 会员

This view

  • Original page
  • New address

GeezerVison is showing leetcode.cn — LCR 182. 动态口令 - 力扣(LeetCode)

题目描述
题目描述
题解
题解
提交记录
提交记录
LCR 182. 动态口令
简单

某公司门禁密码使用动态口令技术。初始密码为字符串 password,密码更新均遵循以下步骤:

  • 设定一个正整数目标值 target
  • 将 password 前 target 个字符按原顺序移动至字符串末尾

请返回更新后的密码字符串。

 

示例 1:

输入: password = "s3cur1tyC0d3", target = 4
输出: "r1tyC0d3s3cu"

示例 2:

输入: password = "lrloseumgh", target = 6
输出: "umghlrlose"

 

提示:

  • 1 <= target < password.length <= 10000

 

 
代码
代码
测试用例
测试用例
测试结果
测试结果
You are visitor 01402911 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.