博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
Codeforces554A:Kyoya and Photobooks
阅读量:7112 次
发布时间:2019-06-28

本文共 1323 字,大约阅读时间需要 4 分钟。

Kyoya Ootori is selling photobooks of the Ouran High School Host Club. He has 26 photos, labeled "a" to "z", and he has compiled them into a photo booklet with some photos in some order (possibly with some photos being duplicated). A photo booklet can be described as a string of lowercase letters, consisting of the photos in the booklet in order. He now wants to sell some "special edition" photobooks, each with one extra photo inserted anywhere in the book. He wants to make as many distinct photobooks as possible, so he can make more money. He asks Haruhi, how many distinct photobooks can he make by inserting one extra photo into the photobook he already has?

Please help Haruhi solve this problem.

Input

The first line of input will be a single string s (1 ≤ |s| ≤ 20). String s consists only of lowercase English letters.

Output

Output a single integer equal to the number of distinct photobooks Kyoya Ootori can make.

Sample test(s)
input
a
output
51
input
hi
output
76
Note

In the first case, we can make 'ab','ac',...,'az','ba','ca',...,'za', and 'aa', producing a total of 51 distinct photo booklets.

题意:

给出一个字符串,问再增加一个字母。能形成多少种字符串

#include 
#include
int main(){ char str[100]; int len; scanf("%s",str); len = strlen(str); printf("%d\n",26*(len+1)-len); return 0;}

转载地址:http://uighl.baihongyu.com/

你可能感兴趣的文章
智能指针
查看>>
安装Ubuntu 18
查看>>
10个帮助你创建超棒jQuery插件的小技巧
查看>>
分享10个jQuery的动态插件
查看>>
数据结构(07)_队列
查看>>
我在学LINUX这几月
查看>>
程序员的故事【番外篇一】
查看>>
信息化工程师的日常
查看>>
MaxCompute SQL 2.0全新的计算引擎
查看>>
Linux学习笔记第五周第四次课(3月8日)
查看>>
用windows命令解压chm文件
查看>>
VMware中三种网络连接的区别
查看>>
PHP课程总结20161111
查看>>
linux环境下搭建W12Scan:一款功能强大的网络安全资产扫描引擎
查看>>
SylixOS PCI BAR寄存器
查看>>
SharedPreferences.Editor 的apply()与commit()方法的区别
查看>>
php基础语法
查看>>
Synchronized及其实现原理
查看>>
GitLab 使用git push 出现RPC failed; HTTP 500 curl 22 The requested URL returned error: 500
查看>>
计算机编程从入门到精通,如何才能快速入门
查看>>