当前位置:网站首页>循环单词
循环单词
2022-08-11 00:33:00 【51CTO】
如果一个单词通过循环右移获得的单词,我们称这些单词都为一种循环单词。 例如:picture 和 turepic 就是属于同一种循环单词。 现在给出n个单词,需要统计这个n个单词中有多少种循环单词。
输入描述:
输入包括n+1行:
第一行为单词个数n(1 ≤ n ≤ 50)
接下来的n行,每行一个单词word[i],长度length(1 ≤ length ≤ 50)。由小写字母构成
输出描述:
输出循环单词的种数
示例1
输入
5
picture
turepic
icturep
word
ordw
输出
2
示例2
输入
4
goran
igor
domagoj
relja
输出
4
说明
并不是必须包含两个或两个以上的不同单词才算一种循环单词!
边栏推荐
猜你喜欢

C#-委托的详细用法

什么是“门”电路(电子硬件)

微信小程序通过URL Scheme动态的渲染数据

leetcode 前K个高频单词

【爬虫】scrapy创建运行爬虫、解析页面(嵌套url)、自定义中间件(设置UserAgent和代理IP)、自定义管道(保存到mysql)

Shell编程三剑客之sed

Go项目配置管理神器之viper使用详解

Which foreign language journals and conferences can be submitted for software engineering/system software/programming language?

16. File upload

① 数据库介绍 及 关系型数据库的关系代数表达式
随机推荐
CF1286E-Fedya the Potter Strikes Back【KMP,RMQ】
[21天学习挑战赛——内核笔记](五)——devmem读写寄存器调试
报错:Client does not support authentication protocol requested by server; consider upgrading MySQL cli
22/8/9 贪心问题合集
Design and Realization of Employment Management System in Colleges and Universities
异常:try catch finally throws throw
鲲鹏编译调试及原生开发工具基础知识
Go项目配置管理神器之viper使用详解
什么是“门”电路(电子硬件)
ADC和DAC记录
Volatile和CAS
5. Lombok
分布式.性能优化
Web-based meal ordering system in epidemic quarantine area
英文文献阅读时,如何做笔记?
【redis】发布和订阅消息
Only lazy and hungry. You still don't understand the singleton pattern!
微信小程序强制更新版本
Design and implementation of flower online sales management system
工程师如何对待开源