report VI VI EN
Register | Login
  • HOME
  • PROBLEMSET
  • ROADMAP
  • COMPETITION
  • TOPIC
  • RANKING
  • GUIDE
  • MASHUP
  • ABOUT
  • CONTACT
  • Problem
  • Submit
  • Results
Repeated string - MarisaOJ: Marisa Online Judge

Repeated string

Time limit: 1000 ms
Memory limit: 256 MB
Given a string $S$ of length $n$ that contains only lowercase English characters. Find the shortest string $T$ so that if you write $T$ repeatedly until $n$ characters have been written, you will have the string $S$. ### Input - A single line containing a string $S$. ### Output - Print $T$. ### Constraints - $1 \le |S| \le 10^5$. ### Example Input: ``` sussussu ``` Output: ``` sus ```
String matching - Hash
String occurences 2
Repeated string
Compare substring
Palindrome substring 2
String combinations
Frequent substring
Good pairs
String rotation
Bit reversing
Repeated string 2
Topic
String
Hashing
Rating 1100
Solution (0) Solution