首页
题库
面试
求职
学习
竞赛
More+
所有博客
搜索面经/职位/试题/公司
搜索
我要招人
去企业版
登录 / 注册
首页
>
试题广场
>
解密
[编程题]解密
热度指数:21944
时间限制: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收藏
18804浏览
热门推荐
通过挑战的用户
查看代码
落霞与孤鹜齐飞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
相关试题
属于组合逻辑电路是()。
数字电路
评论
(1)
有同事不完成任务,影响力进度,你怎...
业务综合
评论
(1)
如果通过这次面试我们单位录用了你,...
岗位认知
自我认知
评论
(1)
请你说说Java的特点和优点,为什...
Java
评论
(267)
你身边有哪些人还没有使用滴滴,你认...
用户研究
评论
(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