Sign in
or
Register
Courses
Textbook
Compiler
Contests
Topics
Courses
Basics of Python
(Python) Subroutines. recursion
Module:
(Python) Subroutines. recursion
Problem
12
/12
Iterating over lines #2
Problem
In the alphabet of the language of the tribe «Tumba-Yumba» four letters: "
K
", "
L
", "
M
" and "
N
". We need to display all possible words consisting of
n
letters (n > 1) in which the second letter is «
K
». Count the number of such words.
Examples
#
Input
Output
1
2
KK
LK
MK
NK
4
(c) K.Yu. Polyakov
1000
ms
256 Mb
Rules for program design and list of errors in automatic problem checking
Teacher commentary