Back
Close

Pattern Time

Statement

 Goal

You are given a pattern repeated in string S, and you have to print the smallest possible pattern one time, example:

if S = ABCABCABCABC, you print ABC
Input
String S, a pattern repeated, with no spaces
Output
the pattern unrepeated
Constraints
The pattern S will repeat itself at least 2 times.
Example
Input
CodingCoding
Output
Coding

Game modes
Fastest, Shortest, Reverse

Test cases
Example Test
Input
CodingCoding
Output
Coding

Validator 1 Validator
Input
ClashClash
Output
Clash

Long, but short Test
Input
AAAAAAAAAAAAAAAA
Output
A

Validator 2 Validator
Input
VVVVVVVVVVVVVVVVV
Output
V

Numbers Test
Input
25352535
Output
2535

Validator 3 Validator
Input
6443789064437890
Output
64437890

Hmmm Test
Input
4365436543654365
Output
4365

Validator 4 Validator
Input
123443212344321234432
Output
1234432

Letters and Numbers Test
Input
AB34EAB34EAB34EAB34E
Output
AB34E

Validator 5 Validator
Input
clash0fc0d3clash0fc0d3
Output
clash0fc0d3

Long Test
Input
egaugnalnoiegaugnalnoiegaugnalnoiegaugnalnoiegaugnalnoiegaugnalnoiegaugnalnoiegaugnalnoi
Output
egaugnalnoi

Validator 6 Validator
Input
PlusMinusTimesDivideSquareSquarerootPlusMinusTimesDivideSquareSquarerootPlusMinusTimesDivideSquareSquarerootPlusMinusTimesDivideSquareSquareroot
Output
PlusMinusTimesDivideSquareSquareroot

Is that really a pattern? Test
Input
AbcdAbcdAbcd3AbcdAbcdAbcd4AbcdAbcdAbcd5AbcdAbcdAbcd3AbcdAbcdAbcd4AbcdAbcdAbcd5
Output
AbcdAbcdAbcd3AbcdAbcdAbcd4AbcdAbcdAbcd5

Validator 7 Validator
Input
Thequickbrownfox6ThequickbrownfoxjumpedThequickbrownfox6Thequickbrownfoxjumped
Output
Thequickbrownfox6Thequickbrownfoxjumped

What? Test
Input
1212112121121211212112121
Output
12121

Validator 8 Validator
Input
46544654465446544654
Output
4654

Solution language

Solution

Stub generator input