Codeforces 554A Kyoya and Photobooks
来源:互联网 发布:免费相册视频制作软件 编辑:程序博客网 时间:2024/05/17 23:08
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
解题思路:算一下即可。
#include <cmath>#include <cstdio>#include <cstdlib>#include <cstring>#include <iostream>#include <string>#include <vector>#include <algorithm>using namespace std;int main() { string s; cin >> s; int len = s.length(); printf("%d\n", -len + 26*(len+1)); return 0;}
- Codeforces 554A Kyoya and Photobooks
- CodeForces-554A Kyoya and Photobooks
- Codeforces 554A Kyoya and Photobooks 【水题】
- CodeForces 554A-Kyoya and Photobooks【规律】
- 【76.83%】【codeforces 554A】Kyoya and Photobooks
- Codeforces 554A Kyoya and Photobooks 插入照片
- CodeForces - 554A Kyoya and Photobooks (水)
- 【CodeForces】554A - Kyoya and Photobooks(思维)
- A. Kyoya and Photobooks
- Codeforces Round #309 (Div. 2) A. Kyoya and Photobooks
- A. Kyoya and Photobooks(Codeforces Round #309 (Div. 2))
- #309 (div.2) A. Kyoya and Photobooks
- CF#309-A. Kyoya and Photobooks-水题
- Codeforces554A:Kyoya and Photobooks
- CodeForces 554AKyoya and Photobooks
- codeforces 553 A Kyoya and Colored Balls
- Codeforces 553A Kyoya and Colored Balls
- CodeForces #554 C Kyoya and Colored Balls
- Android应用程序设置系统时间的方法
- 机器学习概要
- 利用FFmpeg将RTSP转码成RTMP发布在RED5
- windows程序内部运行机制
- rot13
- Codeforces 554A Kyoya and Photobooks
- Tomcat映射路径(应用程序基本目录)的配置方法
- 经典的机器学习方面源代码库(非常全,数据挖掘,计算机视觉,模式识别,信息检索相关领域都适用的了
- tcp socket 网线断开判断
- ‘Failed to load the JNI shared library “C:\Program Files\Java\jdk1.8.0_31\bin\..解决方法
- 利用MongoDB存储scrapy的数据
- 移动定位业务之“OTDOA(观察到达时间差)”
- SQL如何根据指定列的不同值区间分段,如人员表按年龄段区分
- ios通知中心