首页
题库
面试
求职
学习
竞赛
More+
所有博客
搜索面经/职位/试题/公司
搜索
我要招人
去企业版
登录 / 注册
首页
>
试题广场
>
解密
[编程题]解密
热度指数:21999
时间限制:C/C++ 1秒,其他语言2秒
空间限制:C/C++ 32M,其他语言64M
算法知识视频讲解
一条仅包含字母‘A’-‘Z’的消息用下列的方式加密成数字
'A' -> 1 'B' -> 2 ... 'Z' -> 26
现在给出加密成数字的密文,请判断有多少种解密的方法
例如:
给出的密文为“13”,可以解密为
"AC"(1 3) 或者"M"(13).
所以密文
"13"的解密方法是2种.
示例1
输入
"1"
输出
1
示例2
输入
"13"
输出
2
马上挑战
算法知识视频讲解
提交运行
算法知识视频讲解
添加笔记
求解答(3)
邀请回答
收藏(92)
分享
提交结果有问题?
0个回答
1篇题解
添加回答
这道题你会答吗?花几分钟告诉大家答案吧!
提交观点
问题信息
动态规划
难度:
0条回答
92收藏
19296浏览
热门推荐
通过挑战的用户
查看代码
落霞与孤鹜齐飞ccc
2022-09-10 16:06:46
Varus20...
2022-08-21 12:45:06
GoodLuc...
2022-08-04 13:35:57
DamonGuan
2022-07-14 23:29:55
相关试题
明明的随机数
数组
评论
(3922)
来自
华为研发工程师编程题
字符串分隔
字符串
评论
(3152)
() 通过计算机网络给 () 发送...
网络基础
评论
(1)
网易云音乐推荐(网易校招笔试真题)
网易
算法工程师
数据分析师
SQL
2021
评论
(471)
开关闭合瞬间,电容电压uc(0+)为
电路基础
评论
(1)
解密
扫描二维码,关注牛客网
意见反馈
下载牛客APP,随时随地刷题
import java.util.*; public class Solution { /** * * @param s string字符串 * @return int整型 */ public int numDecodings (String s) { // write code here } }
class Solution { public: /** * * @param s string字符串 * @return int整型 */ int numDecodings(string s) { // write code here } };
# # # @param s string字符串 # @return int整型 # class Solution: def numDecodings(self , s ): # write code here
/** * * @param s string字符串 * @return int整型 */ function numDecodings( s ) { // write code here } module.exports = { numDecodings : numDecodings };
# # # @param s string字符串 # @return int整型 # class Solution: def numDecodings(self , s ): # write code here
package main /** * * @param s string字符串 * @return int整型 */ func numDecodings( s string ) int { // write code here }
"1"
1
"13"
2