Problems
Write a program that receives a string and an integer as input, and prints the last part of the string corresponding to the integer from the end.
If the input integer is greater than the length of the string, print the entire string from the end to the beginning.
(The length of the string does not exceed 100 characters.)
Input
The first line contains a string and an integer separated by a space.
The string has a length of at most 100 characters.
The integer is between 1 and 200, inclusive.
Example #1
korea 3
aer
Example #2
abc 80
cba
Source
자기주도C언어프로그래밍