首页
题库
面试
求职
学习
竞赛
More+
所有博客
搜索面经/职位/试题/公司
搜索
我要招人
去企业版
登录 / 注册
首页
>
试题广场
>
解密
[编程题]解密
热度指数:22010
时间限制: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)
邀请回答
收藏(93)
分享
提交结果有问题?
0个回答
2篇题解
添加回答
这道题你会答吗?花几分钟告诉大家答案吧!
提交观点
问题信息
动态规划
难度:
0条回答
93收藏
19403浏览
热门推荐
通过挑战的用户
查看代码
落霞与孤鹜齐飞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
相关试题
校门外的树
枚举
NOIP复赛
评论
(1)
牛牛学立体
过关题目
语言题
评论
(1)
平方根
过关题目
语言题
评论
(1)
请回答问题
图形推理
评论
(2)
下面代码的输出结果 public ...
Java
评论
(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