Skip to content
No description, website, or topics provided.
C#
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
Kata_PrimeString
.gitattributes
.gitignore
Kata_PrimeString.sln
README.md

README.md

Simple Fun #116: Prime String


The string is called prime if it cannot be constructed by concatenating some (more than one) equal strings together.

For example, "abac" is prime, but "xyxy" is not("xyxy"="xy"+"xy").

Given a string determine if it is prime or not.

Input/Output

  • [input] string s

string containing only lowercase English letters

  • [output] a boolean value

true if the string is prime, false otherwise


中文大意

判斷傳入的字串是否為多個相同字串組合而成

You can’t perform that action at this time.