A. Kyoya and Photobooks(Codeforces Round #309 (Div. 2))
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.
The first line of input will be a single string s (1 ≤ |s| ≤ 20).
String s consists only of lowercase English letters.
Output a single integer equal to the number of distinct photobooks Kyoya Ootori can make.
a
51
hi
76
In the first case, we can make 'ab','ac',...,'az','ba','ca',...,'za',
and 'aa', producing a total of 51 distinct photo booklets.
#include <stdio.h>
#include <string.h> int main()
{
char str[100];
int len;
scanf("%s",str);
len = strlen(str);
printf("%d\n",26*(len+1)-len); return 0;
}
A. Kyoya and Photobooks(Codeforces Round #309 (Div. 2))的更多相关文章
- B. Ohana Cleans Up(Codeforces Round #309 (Div. 2))
B. Ohana Cleans Up Ohana Matsumae is trying to clean a room, which is divided up into an n by n gr ...
- 【CodeForces】841D. Leha and another game about graph(Codeforces Round #429 (Div. 2))
[题意]给定n个点和m条无向边(有重边无自环),每个点有权值di=-1,0,1,要求仅保留一些边使得所有点i满足:di=-1或degree%2=di,输出任意方案. [算法]数学+搜索 [题解] 最关 ...
- C. Kyoya and Colored Balls(Codeforces Round #309 (Div. 2))
C. Kyoya and Colored Balls Kyoya Ootori has a bag with n colored balls that are colored with k diffe ...
- B. The Number of Products(Codeforces Round #585 (Div. 2))
本题地址: https://codeforces.com/contest/1215/problem/B 本场比赛A题题解:https://www.cnblogs.com/liyexin/p/11535 ...
- 【CodeForces】841C. Leha and Function(Codeforces Round #429 (Div. 2))
[题意]定义函数F(n,k)为1~n的集合中选择k个数字,其中最小数字的期望. 给定两个数字集A,B,A中任意数字>=B中任意数字,要求重组A使得对于i=1~n,sigma(F(Ai,Bi))最 ...
- D. Zero Quantity Maximization ( Codeforces Round #544 (Div. 3) )
题目链接 参考题解 题意: 给你 整形数组a 和 整形数组b ,要你c[i] = d * a[i] + b[i], 求 在c[i]=0的时候 相同的d的数量 最多能有几个. 思路: 1. 首先打开 ...
- Vus the Cossack and Strings(Codeforces Round #571 (Div. 2))(大佬的位运算实在是太强了!)
C. Vus the Cossack and Strings Vus the Cossack has two binary strings, that is, strings that consist ...
- CodeForces 360E Levko and Game(Codeforces Round #210 (Div. 1))
题意:有一些无向边m条权值是给定的k条权值在[l,r]区间可以由你来定,一个点s1 出发一个从s2出发 问s1 出发的能不能先打到f 思路:最短路. 首先检测能不能赢 在更新的时候 如果对于一条边 ...
- 贪心+构造( Codeforces Round #344 (Div. 2))
题目:Report 题意:有两种操作: 1)t = 1,前r个数字按升序排列: 2)t = 2,前r个数字按降序排列: 求执行m次操作后的排列顺序. #include <iostream&g ...
随机推荐
- Html.AntiForgeryToken() 防止CSRF攻击 的AJaX应用
有关Html.AntiForgeryToken()的使用其实网上的说明很多了,比如http://blog.csdn.net/cpytiger/article/details/8781457 那么我们写 ...
- SQL SERVER 的用户数,连接,连接池 license
SQL SERVER 理论上有32767个逻辑连接,SQL SERVER根据系统自行调配连接池. 首先 ,操作系统的用户数:即同时通过网络连接到这台电脑上面的用户限制,以5用户操作系统,搭建的文件服务 ...
- How to Build a Search Page with Elasticsearch and .NET
Although SQL Server's Full-Text search is good for searching text that is within a database, there a ...
- IDEA注册码和license服务器附使用方法
以下两种方式均可激活intellij Idea 15和16版本 最上方点击,Help->Registet 1.注册码 43B4A73YYJ-eyJsaWNlbnNlSWQiOiI0M0I0QTc ...
- springboot 中使用事务
直接在service 层的方法上加上@Transactional 注解就ok. 注意事项: 1.Spring 基于注解的声明式事物 @Transactional 默认情况下只会对运行期异常(java. ...
- java 上传图片压缩
public static void uploadFile(MultipartFile multfile, String filePath) throws Exception { File targe ...
- 解决:Failure to transfer org.apache.maven.plugins:maven-jar-plugin:pom:2.4 from错误
在使用Maven时出现以下错误: Failure to transfer org.apache.maven.plugins:maven-jar-plugin:pom:2.4 from https:// ...
- 从头认识java-15.7 Map(7)-TreeMap与LinkedHashMap
这一章节我们来讨论一下Map两个比較经常使用的实现:TreeMap与LinkedHashMap. 1.TreeMap 特性:依照key来排序 package com.ray.ch14; import ...
- Java开发 - 异常 - 抛出异常
问题: 如何抛出一个系统异常并且捕获它 代码如下: public class ThrowDemo { static void demoproc() { try { throw new NullPoin ...
- TFS 之 彻底删除团队项目
方式一 通过选择“齿轮图标”打开团队项目集合的管理上下文. 打开要删除的团队项目的 上下文菜单. 如果未看到上下文图标 (),则你不是在访问 Visual Studio Online,或不是项目集合管 ...