28 ASCII Range Character Counter
Given a string (S) of length K, and two integers, N and M.
Problem
Count the number of characters, whose ASCII value is within
Statement
the range defined by N, M (both inclusive). Given that N < M.
Input First line has 3 space separated integers K, N and M.
Format
Output A single input.
Format
Sample 15 67 75
Input AB*abXYDEF#@pqr
Sample 3
Output
29 Strip Characters
Given a string (S) of length N, and an integer (K). Print S, after
Problem
stripping the first K and the last K characters. You can
Statement
assume that 2K < N.
Input First line has two input numbers N and K. Second line has a
Format input string.
Output Single line string output.
Format
Sample 11 3
Input abcdefghikj
Sample defgh
Output
31 Rotate String - 1
Rotate the given string S of length N by K places towards left.
Problem
Given that K <= N.
Statement
Input First line has 2 space separated number N and K.
Format Second line has an input string.
Output A single line output string.
Format
Sample 13 3
Input quickfoxbrown
Sample ckfoxbrownqui
Output
32 Rotate String - 2
Rotate the given string S of length N by K places towards
Problem
right. Given that K <= N.
Statement
Input First line has 2 space separated number N and K.
Format Second line has an input string.
Output A single line output string.
Format
Sample 13 3
Input quickfoxbrown
Sample ownquickfoxbr
Output
35 Transform String
Given a string consisting of digits, alphabets and special
characters. Transform this string into another by converting
Problem
all alphabets into small case letters, leaving digits as it is and
Statement
moving the special characters at the end. Print the
transformed string.
Input First line has a single input number N. Second line has an
Format input string.
Output A single line output.
Format
Sample 15
Input abc12AD34@##123
Sample abc12ad34123@##
Output
36 K Rotate
Given an alphanumeric string, S. Let the sum of squares of
Problem digits in S be K. If K is even, rotate the alphabets of S
Statement rightwards by K positions, otherwise rotate it leftwards by K
positions. Print the rotated string.
Input First line has a single input number N. Second line has an
Format input string.
Output A single line output.
Format
Sample 9
Input 2ab3cd45e
Sample bcdea
Output