extraFront
Statement
Goal
Given a string, return a new string made of 3 copies of the first 2 chars of the original string. The string may be any length. If there are fewer than 2 chars, use whatever is there.Input
The main string str.
Output
3 copies of the first 2 chars of the original string
Constraints
Example
Input
hello
Output
hehehe
Game modes
Fastest
Test cases
Test 1 Test
Input
hello
Output
hehehe
Validator 1 Validator
Input
HELLO
Output
HEHEHE
Test 2 Test
Input
ab
Output
ababab
Validator 2 Validator
Input
AB
Output
ABABAB
Test 3 Test
Input
h
Output
hhh
Validator 3 Validator
Input
H
Output
HHH
Test 4 Test
Input
candy
Output
cacaca
Validator 4 Validator
Input
CANDY
Output
CACACA
Solution language
Solution
Stub generator input