Back
Close

Alphabet on n

Statement

 Goal

Print n letters of the alphabet in order and starting from the letter s. Letter case should be the same as letter s. Wrap back to the start of the alphabet after 'z' or 'Z'.
Input
Line 1: An integer n for the number of letters to print.
Line 2: The starting letter s.
Output
An alphabet string n letters long starting from letter s, in the same case as s.
Constraints
1 ≤ n ≤ 100
s is a character (lower or upper case)
Example
Input
3
a
Output
abc

Game modes
FastestShortestReverse

Test cases
Test 1 Test
Input
3 a
Output
abc

Validator 1 Validator
Input
6 a
Output
abcdef

Test 2 Test
Input
4 z
Output
zabc

Validator 2 Validator
Input
5 z
Output
zabcd

Test 3 Test
Input
2 J
Output
JK

Validator 3 Validator
Input
3 J
Output
JKL

Test 4 Test
Input
27 b
Output
bcdefghijklmnopqrstuvwxyzab

Validator 4 Validator
Input
27 a
Output
abcdefghijklmnopqrstuvwxyza

Test 5 Test
Input
10 f
Output
fghijklmno

Validator 5 Validator
Input
11 f
Output
fghijklmnop

Test 6 Test
Input
100 A
Output
ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUV

Validator 6 Validator
Input
98 A
Output
ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRST

Test 7 Test
Input
1 h
Output
h

Validator 7 Validator
Input
1 O
Output
O

Solution language

Solution

Stub generator input
codingame x discord
Join the CodinGame community on Discord to chat about puzzle contributions, challenges, streams, blog articles - all that good stuff!
JOIN US ON DISCORD
Online Participants