首页
题库
面试
求职
学习
竞赛
More+
所有博客
搜索面经/职位/试题/公司
搜索
我要招人
去企业版
登录 / 注册
首页
>
试题广场
>
字符串算术运算
[编程题]字符串算术运算
热度指数:1820
时间限制:C/C++ 1秒,其他语言2秒
空间限制:C/C++ 256M,其他语言512M
算法知识视频讲解
给定一个字符串式子,返回它的计算结果。算术
规则为: k*[encoded_string],表示其中方括号内部的 encoded_string 正好重复 k 次。注意 k 保证为正整数。e.g.
s = "3*[a2*[c]]", 返回 “accaccacc”
示例1
输入
"3*[a2*[c]]"
输出
"accaccacc"
马上挑战
算法知识视频讲解
提交运行
算法知识视频讲解
添加笔记
求解答(28)
邀请回答
收藏(67)
分享
纠错
提交结果有问题?
0个回答
0篇题解
添加回答
这道题你会答吗?花几分钟告诉大家答案吧!
提交观点
问题信息
C++工程师
golang工程师
iOS工程师
安卓工程师
运维工程师
前端工程师
算法工程师
测试工程师
PHP工程师
安全工程师
游戏研发工程师
2021
数据库工程师
测试开发工程师
虾皮信息
大数据开发工程师
Java工程师
上传者:
小小
难度:
0条回答
67收藏
4261浏览
热门推荐
通过挑战的用户
神户小鸟
2022-10-06 20:51:23
陆陆呆
2022-09-20 00:53:39
牛客57715...
2022-09-17 16:20:06
牛客娇娇
2022-09-09 17:23:22
牛客33773...
2022-09-08 16:12:13
相关试题
合并二叉树
Java工程师
C++工程师
iOS工程师
安卓工程师
运维工程师
前端工程师
算法工程师
PHP工程师
测试工程师
安全工程师
c#工程师
数据库工程师
大数据开发工程师
瓜子二手车
2019
评论
(7)
五月份的商品销售额为60万元,该月...
数据分析师
途虎
2021
评论
(2)
来自
途虎养车2021秋招数据...
相关性分析有哪些?
评论
(1)
如何检验聚类分析结果
评论
(1)
扫描二维码,关注牛客网
意见反馈
下载牛客APP,随时随地刷题
import java.util.*; public class Solution { /** * * @param str string字符串 * @return string字符串 */ public String computeString (String str) { // write code here } }
class Solution { public: /** * * @param str string字符串 * @return string字符串 */ string computeString(string str) { // write code here } };
# # # @param str string字符串 # @return string字符串 # class Solution: def computeString(self , str ): # write code here
/** * * @param str string字符串 * @return string字符串 */ function computeString( str ) { // write code here } module.exports = { computeString : computeString };
# # # @param str string字符串 # @return string字符串 # class Solution: def computeString(self , str ): # write code here
package main /** * * @param str string字符串 * @return string字符串 */ func computeString( str string ) string { // write code here }
/** * * @param str string字符串 * @return string字符串 */ char* computeString(char* str ) { // write code here }
"3*[a2*[c]]"
"accaccacc"