Task: Program Execution
Input (English): k, 187, 81, 301, 227, 343
Output (English): 0, 1, 2, 3, 4, 7, 8