Untitled

mail@pastecode.io avatar
unknown
csharp
2 years ago
537 B
2
Indexable
Never
public class Program
{
    public static void Main(string[] args) { 
    string input=Console.ReadLine();
        int i = int.Parse(Console.ReadLine());
        while (i > 0)
        {
            input=stringRot(input);
            i--;
            //Console.WriteLine(input);
        }
        Console.WriteLine(input);
    
    }

    private static string stringRot(string? input)
    {
        char lst = input[input.Length - 1];
        input = input.Remove(input.Length - 1);
        return lst+input;
    }
}