shawnmkim/compete-collab-taskbank huggingface dataset:
Write a function to find the longest chain which can be formed from the given set of pairs.

The function signature must exactly match the following example (same function name and argument order):
assert max_chain_length([Pair(5, 24), Pair(15, 25),Pair(27, 40), Pair(50, 60)], 4) == 3


Tests:
assert max_chain_length([Pair(1, 2), Pair(3, 4),Pair(5, 6), Pair(7, 8)], 4) == 4
assert max_chain_length([Pair(19, 10), Pair(11, 12),Pair(13, 14), Pair(15, 16), Pair(31, 54)], 5) == 5
Write a python function to find the first repeated character in a given string.

The function signature must exactly match the following example (same function name and argument order):
assert first_repeated_char("abcabc") == "a"


Tests:
assert first_repeated_char("abc") == "None"
assert first_repeated_char("123123") == "1"
Write a function to get a lucid number smaller than or equal to n.

The function signature must exactly match the following example (same function name and argument order):
assert get_ludic(10) == [1, 2, 3, 5, 7]


Tests:
assert get_ludic(25) == [1, 2, 3, 5, 7, 11, 13, 17, 23, 25]
assert get_ludic(45) == [1, 2, 3, 5, 7, 11, 13, 17, 23, 25, 29, 37, 41, 43]
Write a function to reverse words in a given string.

The function signature must exactly match the following example (same function name and argument order):
assert reverse_words("python program")==("program python")


Tests:
assert reverse_words("java language")==("language java")
assert reverse_words("indian man")==("man indian")
Write a function to check if the given integer is a prime number.

The function signature must exactly match the following example (same function name and argument order):
assert prime_num(13)==True


Tests:
assert prime_num(7)==True
assert prime_num(-1010)==False
Write a function to convert degrees to radians.

The function signature must exactly match the following example (same function name and argument order):
assert radian_degree(90)==1.5707963267948966


Tests:
assert radian_degree(60)==1.0471975511965976
assert radian_degree(120)==2.0943951023931953
Write a function to search a literals string in a string and also find the location within the original string where the pattern occurs by using regex.

The function signature must exactly match the following example (same function name and argument order):
assert find_literals('The quick brown fox jumps over the lazy dog.', 'fox') == ('fox', 16, 19)


Tests:
assert find_literals('Its been a very crazy procedure right', 'crazy') == ('crazy', 16, 21)
assert find_literals('Hardest choices required strongest will', 'will') == ('will', 35, 39)
Write a python function to find nth bell number.

The function signature must exactly match the following example (same function name and argument order):
assert bell_Number(2) == 2


Tests:
assert bell_Number(3) == 5
assert bell_Number(4) == 15
Write a python function to find minimum possible value for the given periodic function.

The function signature must exactly match the following example (same function name and argument order):
assert floor_Min(10,20,30) == 15


Tests:
assert floor_Min(1,2,1) == 0
assert floor_Min(11,10,9) == 9
Write a python function to remove the k'th element from a given list.

The function signature must exactly match the following example (same function name and argument order):
assert remove_kth_element([1,1,2,3,4,4,5,1],3)==[1, 1, 3, 4, 4, 5, 1]


Tests:
assert remove_kth_element([0, 0, 1, 2, 3, 4, 4, 5, 6, 6, 6, 7, 8, 9, 4, 4],4)==[0, 0, 1, 3, 4, 4, 5, 6, 6, 6, 7, 8, 9, 4, 4]
assert remove_kth_element([10, 10, 15, 19, 18, 18, 17, 26, 26, 17, 18, 10],5)==[10,10,15,19, 18, 17, 26, 26, 17, 18, 10]
Write a function to find the maximum of nth column from the given tuple list.

The function signature must exactly match the following example (same function name and argument order):
assert max_of_nth([(5, 6, 7), (1, 3, 5), (8, 9, 19)], 2) == 19


Tests:
assert max_of_nth([(6, 7, 8), (2, 4, 6), (9, 10, 20)], 1) == 10
assert max_of_nth([(7, 8, 9), (3, 5, 7), (10, 11, 21)], 1) == 11
Write a python function to merge the first and last elements separately in a list of lists.

The function signature must exactly match the following example (same function name and argument order):
assert merge([['x', 'y'], ['a', 'b'], ['m', 'n']]) == [['x', 'a', 'm'], ['y', 'b', 'n']]


Tests:
assert merge([[1, 2], [3, 4], [5, 6], [7, 8]]) == [[1, 3, 5, 7], [2, 4, 6, 8]]
assert merge([['x', 'y','z' ], ['a', 'b','c'], ['m', 'n','o']]) == [['x', 'a', 'm'], ['y', 'b', 'n'],['z', 'c','o']]
Write a function to find the maximum value in record list as tuple attribute in the given tuple list.

The function signature must exactly match the following example (same function name and argument order):
assert maximum_value([('key1', [3, 4, 5]), ('key2', [1, 4, 2]), ('key3', [9, 3])]) == [('key1', 5), ('key2', 4), ('key3', 9)]


Tests:
assert maximum_value([('key1', [4, 5, 6]), ('key2', [2, 5, 3]), ('key3', [10, 4])]) == [('key1', 6), ('key2', 5), ('key3', 10)]
assert maximum_value([('key1', [5, 6, 7]), ('key2', [3, 6, 4]), ('key3', [11, 5])]) == [('key1', 7), ('key2', 6), ('key3', 11)]
Write a function to find the cumulative sum of all the values that are present in the given tuple list.

The function signature must exactly match the following example (same function name and argument order):
assert cummulative_sum([(1, 3), (5, 6, 7), (2, 6)]) == 30


Tests:
assert cummulative_sum([(2, 4), (6, 7, 8), (3, 7)]) == 37
assert cummulative_sum([(3, 5), (7, 8, 9), (4, 8)]) == 44
Write a function to find average value of the numbers in a given tuple of tuples.

The function signature must exactly match the following example (same function name and argument order):
assert average_tuple(((10, 10, 10, 12), (30, 45, 56, 45), (81, 80, 39, 32), (1, 2, 3, 4)))==[30.5, 34.25, 27.0, 23.25]


Tests:
assert average_tuple(((1, 1, -5), (30, -15, 56), (81, -60, -39), (-10, 2, 3)))== [25.5, -18.0, 3.75]
assert average_tuple( ((100, 100, 100, 120), (300, 450, 560, 450), (810, 800, 390, 320), (10, 20, 30, 40)))==[305.0, 342.5, 270.0, 232.5]
Write a function to perfom the modulo of tuple elements in the given two tuples.

The function signature must exactly match the following example (same function name and argument order):
assert tuple_modulo((10, 4, 5, 6), (5, 6, 7, 5)) == (0, 4, 5, 1)


Tests:
assert tuple_modulo((11, 5, 6, 7), (6, 7, 8, 6)) == (5, 5, 6, 1)
assert tuple_modulo((12, 6, 7, 8), (7, 8, 9, 7)) == (5, 6, 7, 1)
Write a function to check for the number of jumps required of given length to reach a point of form (d, 0) from origin in a 2d plane.

The function signature must exactly match the following example (same function name and argument order):
assert min_Jumps(3,4,11)==3.5


Tests:
assert min_Jumps(3,4,0)==0
assert min_Jumps(11,14,11)==1
Write a function to divide two lists using map and lambda function.

The function signature must exactly match the following example (same function name and argument order):
assert div_list([4,5,6],[1, 2, 3])==[4.0,2.5,2.0]


Tests:
assert div_list([3,2],[1,4])==[3.0, 0.5]
assert div_list([90,120],[50,70])==[1.8, 1.7142857142857142]
Write a function to move all the numbers in it to the given string.

The function signature must exactly match the following example (same function name and argument order):
assert move_num('I1love143you55three3000thousand') == 'Iloveyouthreethousand1143553000'


Tests:
assert move_num('Avengers124Assemble') == 'AvengersAssemble124'
assert move_num('Its11our12path13to14see15things16do17things') == 'Itsourpathtoseethingsdothings11121314151617'
Write a function to find the largest subset where each pair is divisible.

The function signature must exactly match the following example (same function name and argument order):
assert largest_subset([ 1, 3, 6, 13, 17, 18 ], 6) == 4


Tests:
assert largest_subset([10, 5, 3, 15, 20], 5) == 3
assert largest_subset([18, 1, 3, 6, 13, 17], 6) == 4
Write a function to increment the numeric values in the given strings by k.

The function signature must exactly match the following example (same function name and argument order):
assert increment_numerics(["MSM", "234", "is", "98", "123", "best", "4"] , 6) == ['MSM', '240', 'is', '104', '129', 'best', '10']


Tests:
assert increment_numerics(["Dart", "356", "is", "88", "169", "Super", "6"] , 12) == ['Dart', '368', 'is', '100', '181', 'Super', '18']
assert increment_numerics(["Flutter", "451", "is", "44", "96", "Magnificent", "12"] , 33) == ['Flutter', '484', 'is', '77', '129', 'Magnificent', '45']
Write a function to find the median of two sorted arrays of same size.

The function signature must exactly match the following example (same function name and argument order):
assert get_median([1, 12, 15, 26, 38], [2, 13, 17, 30, 45], 5) == 16.0


Tests:
assert get_median([2, 4, 8, 9], [7, 13, 19, 28], 4) == 8.5
assert get_median([3, 6, 14, 23, 36, 42], [2, 18, 27, 39, 49, 55], 6) == 25.0
Write a function to find the n-th power of individual elements in a list using lambda function.

The function signature must exactly match the following example (same function name and argument order):
assert nth_nums([1, 2, 3, 4, 5, 6, 7, 8, 9, 10],2)==[1, 4, 9, 16, 25, 36, 49, 64, 81, 100]


Tests:
assert nth_nums([10,20,30],3)==([1000, 8000, 27000])
assert nth_nums([12,15],5)==([248832, 759375])
Write a python function to convert the given string to upper case.

The function signature must exactly match the following example (same function name and argument order):
assert is_upper("person") =="PERSON"


Tests:
assert is_upper("final") == "FINAL"
assert is_upper("Valid") == "VALID"
Write a python function to interchange first and last elements in a given list.

The function signature must exactly match the following example (same function name and argument order):
assert swap_List([1,2,3]) == [3,2,1]


Tests:
assert swap_List([1,2,3,4,4]) == [4,2,3,4,1]
assert swap_List([4,5,6]) == [6,5,4]
Write a python function to find the largest triangle that can be inscribed in the semicircle.

The function signature must exactly match the following example (same function name and argument order):
assert triangle_area(0) == 0


Tests:
assert triangle_area(-1) == -1
assert triangle_area(2) == 4
Write a python function to find the smallest missing number from the given array.

The function signature must exactly match the following example (same function name and argument order):
assert find_First_Missing([0,1,2,3],0,3) == 4


Tests:
assert find_First_Missing([0,1,2,6,9],0,4) == 3
assert find_First_Missing([2,3,5,8,9],0,4) == 0
Write a function to replace all spaces in the given string with character * list item * list item * list item * list item '%20'.

The function signature must exactly match the following example (same function name and argument order):
assert replace_spaces("My Name is Dawood") == 'My%20Name%20is%20Dawood'


Tests:
assert replace_spaces("I am a Programmer") == 'I%20am%20a%20Programmer'
assert replace_spaces("I love Coding") == 'I%20love%20Coding'
Write a python function to find even numbers from a mixed list.

The function signature must exactly match the following example (same function name and argument order):
assert Split([1,2,3,4,5]) == [2,4]


Tests:
assert Split([4,5,6,7,8,0,1]) == [4,6,8,0]
assert Split ([8,12,15,19]) == [8,12]
Write a function to extract all the adjacent coordinates of the given coordinate tuple.

The function signature must exactly match the following example (same function name and argument order):
assert get_coordinates((3, 4)) == [[2, 3], [2, 4], [2, 5], [3, 3], [3, 4], [3, 5], [4, 3], [4, 4], [4, 5]]


Tests:
assert get_coordinates((4, 5)) ==[[3, 4], [3, 5], [3, 6], [4, 4], [4, 5], [4, 6], [5, 4], [5, 5], [5, 6]]
assert get_coordinates((5, 6)) == [[4, 5], [4, 6], [4, 7], [5, 5], [5, 6], [5, 7], [6, 5], [6, 6], [6, 7]]
Write a function to replace whitespaces with an underscore and vice versa in a given string by using regex.

The function signature must exactly match the following example (same function name and argument order):
assert replace_spaces('Jumanji The Jungle') == 'Jumanji_The_Jungle'


Tests:
assert replace_spaces('The Avengers') == 'The_Avengers'
assert replace_spaces('Fast and Furious') == 'Fast_and_Furious'
Write a python function to move all zeroes to the end of the given list.

The function signature must exactly match the following example (same function name and argument order):
assert move_zero([1,0,2,0,3,4]) == [1,2,3,4,0,0]


Tests:
assert move_zero([2,3,2,0,0,4,0,5,0]) == [2,3,2,4,5,0,0,0,0]
assert move_zero([0,1,0,1,1]) == [1,1,1,0,0]
Write a python function to find the sum of xor of all pairs of numbers in the given array.

The function signature must exactly match the following example (same function name and argument order):
assert pair_OR_Sum([5,9,7,6],4) == 47


Tests:
assert pair_OR_Sum([7,3,5],3) == 12
assert pair_OR_Sum([7,3],2) == 4
Write a python function to find the sum of fourth power of first n even natural numbers.

The function signature must exactly match the following example (same function name and argument order):
assert even_Power_Sum(2) == 272


Tests:
assert even_Power_Sum(3) == 1568
assert even_Power_Sum(4) == 5664
Write a function to push all values into a heap and then pop off the smallest values one at a time.

The function signature must exactly match the following example (same function name and argument order):
assert heap_sort([1, 3, 5, 7, 9, 2, 4, 6, 8, 0])==[0, 1, 2, 3, 4, 5, 6, 7, 8, 9]


Tests:
assert heap_sort([25, 35, 22, 85, 14, 65, 75, 25, 58])==[14, 22, 25, 25, 35, 58, 65, 75, 85]
assert heap_sort( [7, 1, 9, 5])==[1,5,7,9]
Write a python function to check if roots of a quadratic equation are reciprocal of each other or not.

The function signature must exactly match the following example (same function name and argument order):
assert Check_Solution(2,0,2) == "Yes"


Tests:
assert Check_Solution(2,-5,2) == "Yes"
assert Check_Solution(1,2,3) == "No"
Write a function to check whether the given amount has no profit and no loss

The function signature must exactly match the following example (same function name and argument order):
assert noprofit_noloss(1500,1200)==False


Tests:
assert noprofit_noloss(100,100)==True
assert noprofit_noloss(2000,5000)==False
Write a function to calculate wind chill index.

The function signature must exactly match the following example (same function name and argument order):
assert wind_chill(120,35)==40


Tests:
assert wind_chill(40,70)==86
assert wind_chill(10,100)==116
Write a function to sum the length of the names of a given list of names after removing the names that start with a lowercase letter.

The function signature must exactly match the following example (same function name and argument order):
assert sample_nam(['sally', 'Dylan', 'rebecca', 'Diana', 'Joanne', 'keith'])==16


Tests:
assert sample_nam(["php", "res", "Python", "abcd", "Java", "aaa"])==10
assert sample_nam(["abcd", "Python", "abba", "aba"])==6
Write a function to remove the parenthesis area in a string.

The function signature must exactly match the following example (same function name and argument order):
assert remove_parenthesis(["python (chrome)"])==("python")


Tests:
assert remove_parenthesis(["string(.abc)"])==("string")
assert remove_parenthesis(["alpha(num)"])==("alpha")
Write a function to find the nth nonagonal number.

The function signature must exactly match the following example (same function name and argument order):
assert is_nonagonal(10) == 325


Tests:
assert is_nonagonal(15) == 750
assert is_nonagonal(18) == 1089
Write a function to remove similar rows from the given tuple matrix.

The function signature must exactly match the following example (same function name and argument order):
assert remove_similar_row([[(4, 5), (3, 2)], [(2, 2), (4, 6)], [(3, 2), (4, 5)]] ) == {((2, 2), (4, 6)), ((3, 2), (4, 5))}


Tests:
assert remove_similar_row([[(5, 6), (4, 3)], [(3, 3), (5, 7)], [(4, 3), (5, 6)]] ) == {((4, 3), (5, 6)), ((3, 3), (5, 7))}
assert remove_similar_row([[(6, 7), (5, 4)], [(4, 4), (6, 8)], [(5, 4), (6, 7)]] ) =={((4, 4), (6, 8)), ((5, 4), (6, 7))}
Write a function that matches a word containing 'z', not at the start or end of the word.

The function signature must exactly match the following example (same function name and argument order):
assert text_match_wordz_middle("pythonzabc.")==('Found a match!')


Tests:
assert text_match_wordz_middle("xyzabc.")==('Found a match!')
assert text_match_wordz_middle("  lang  .")==('Not matched!')
Write a python function to reverse an array upto a given position.

The function signature must exactly match the following example (same function name and argument order):
assert reverse_Array_Upto_K([1, 2, 3, 4, 5, 6],4) == [4, 3, 2, 1, 5, 6]


Tests:
assert reverse_Array_Upto_K([4, 5, 6, 7], 2) == [5, 4, 6, 7]
assert reverse_Array_Upto_K([9, 8, 7, 6, 5],3) == [7, 8, 9, 6, 5]
Write a function to find the product of it’s kth index in the given tuples.

The function signature must exactly match the following example (same function name and argument order):
assert find_k_product([(5, 6, 7), (1, 3, 5), (8, 9, 19)], 2) == 665


Tests:
assert find_k_product([(6, 7, 8), (2, 4, 6), (9, 10, 20)], 1) == 280
assert find_k_product([(7, 8, 9), (3, 5, 7), (10, 11, 21)], 0) == 210
Write a python function to count number of cubes of size k in a cube of size n.

The function signature must exactly match the following example (same function name and argument order):
assert No_of_cubes(2,1) == 8


Tests:
assert No_of_cubes(5,2) == 64
assert No_of_cubes(1,1) == 1
Write a function to split a string at uppercase letters.

The function signature must exactly match the following example (same function name and argument order):
assert split_upperstring("PythonProgramLanguage")==['Python','Program','Language']


Tests:
assert split_upperstring("PythonProgram")==['Python','Program']
assert split_upperstring("ProgrammingLanguage")==['Programming','Language']
Write a function to exchange the position of every n-th value with (n+1)th value and (n+1)th value with n-th value in a given list.

The function signature must exactly match the following example (same function name and argument order):
assert exchange_elements([0,1,2,3,4,5])==[1, 0, 3, 2, 5, 4] 


Tests:
assert exchange_elements([5,6,7,8,9,10])==[6,5,8,7,10,9] 
assert exchange_elements([25,35,45,55,75,95])==[35,25,55,45,95,75]
Write a python function to calculate the sum of the numbers in a list between the indices of a specified range.

The function signature must exactly match the following example (same function name and argument order):
assert sum_Range_list([2, 1, 5, 6, 8, 3, 4, 9, 10, 11, 8, 12],8,10) == 29


Tests:
assert sum_Range_list([1,2,3,4,5],1,2) == 5
assert sum_Range_list([1,0,1,2,5,6],4,5) == 11
Write a python function to check whether the given two arrays are equal or not.

The function signature must exactly match the following example (same function name and argument order):
assert are_Equal([1,2,3],[3,2,1],3,3) == True


Tests:
assert are_Equal([1,1,1],[2,2,2],3,3) == False
assert are_Equal([8,9],[4,5,6],2,3) == False
Write a function to check if one tuple is a subset of another tuple.

The function signature must exactly match the following example (same function name and argument order):
assert check_subset((10, 4, 5, 6), (5, 10)) == True


Tests:
assert check_subset((1, 2, 3, 4), (5, 6)) == False
assert check_subset((7, 8, 9, 10), (10, 8)) == True
Write a function to flatten the given tuple matrix into the tuple list with each tuple representing each column.

The function signature must exactly match the following example (same function name and argument order):
assert matrix_to_list([[(4, 5), (7, 8)], [(10, 13), (18, 17)], [(0, 4), (10, 1)]]) == '[(4, 7, 10, 18, 0, 10), (5, 8, 13, 17, 4, 1)]'


Tests:
assert matrix_to_list([[(5, 6), (8, 9)], [(11, 14), (19, 18)], [(1, 5), (11, 2)]]) == '[(5, 8, 11, 19, 1, 11), (6, 9, 14, 18, 5, 2)]'
assert matrix_to_list([[(6, 7), (9, 10)], [(12, 15), (20, 21)], [(23, 7), (15, 8)]]) == '[(6, 9, 12, 20, 23, 15), (7, 10, 15, 21, 7, 8)]'
Write a function to group a sequence of key-value pairs into a dictionary of lists using collections module.

The function signature must exactly match the following example (same function name and argument order):
assert grouping_dictionary([('yellow', 1), ('blue', 2), ('yellow', 3), ('blue', 4), ('red', 1)])== ({'yellow': [1, 3], 'blue': [2, 4], 'red': [1]})


Tests:
assert grouping_dictionary([('yellow', 10), ('blue', 20), ('yellow', 30), ('blue', 40), ('red', 10)])== ({'yellow': [10, 30], 'blue': [20, 40], 'red': [10]})
assert grouping_dictionary([('yellow', 15), ('blue', 25), ('yellow', 35), ('blue', 45), ('red', 15)])== ({'yellow': [15, 35], 'blue': [25, 45], 'red': [15]})
Write a function to find the perimeter of a rectangle.

The function signature must exactly match the following example (same function name and argument order):
assert rectangle_perimeter(10,20)==60


Tests:
assert rectangle_perimeter(10,5)==30
assert rectangle_perimeter(4,2)==12
Write a python function to find the sum of fifth power of n natural numbers.

The function signature must exactly match the following example (same function name and argument order):
assert fifth_Power_Sum(2) == 33


Tests:
assert fifth_Power_Sum(4) == 1300
assert fifth_Power_Sum(3) == 276
Write a python function to find the minimum sum of absolute differences of two arrays.

The function signature must exactly match the following example (same function name and argument order):
assert find_Min_Sum([3,2,1],[2,1,3],3) == 0


Tests:
assert find_Min_Sum([1,2,3],[4,5,6],3) == 9
assert find_Min_Sum([4,1,8,7],[2,3,6,5],4) == 6
Write a python function to find the first digit in factorial of a given number.

The function signature must exactly match the following example (same function name and argument order):
assert first_Digit(5) == 1


Tests:
assert first_Digit(10) == 3
assert first_Digit(7) == 5
Write a function to find the item with maximum occurrences in a given list.

The function signature must exactly match the following example (same function name and argument order):
assert max_occurrences([2,3,8,4,7,9,8,2,6,5,1,6,1,2,3,4,6,9,1,2])==2


Tests:
assert max_occurrences([1, 3,5, 7,1, 3,13, 15, 17,5, 7,9,1, 11])==1
assert max_occurrences([1, 2, 3,2, 4, 5,1, 1, 1])==1
Write a python function to print duplicants from a list of integers.

The function signature must exactly match the following example (same function name and argument order):
assert Repeat([10, 20, 30, 20, 20, 30, 40, 50, -20, 60, 60, -20, -20]) == [20, 30, -20, 60]


Tests:
assert Repeat([-1, 1, -1, 8]) == [-1]
assert Repeat([1, 2, 3, 1, 2,]) == [1, 2]
Write a python function to choose points from two ranges such that no point lies in both the ranges.

The function signature must exactly match the following example (same function name and argument order):
assert find_Points(5,10,1,5) == (1,10)


Tests:
assert find_Points(3,5,7,9) == (3,9)
assert find_Points(1,5,2,8) == (1,8)
Write a function to find the maximum sum that can be formed which has no three consecutive elements present.

The function signature must exactly match the following example (same function name and argument order):
assert max_sum_of_three_consecutive([100, 1000, 100, 1000, 1], 5) == 2101


Tests:
assert max_sum_of_three_consecutive([3000, 2000, 1000, 3, 10], 5) == 5013
assert max_sum_of_three_consecutive([1, 2, 3, 4, 5, 6, 7, 8], 8) == 27
Write a function to sort a list in a dictionary.

The function signature must exactly match the following example (same function name and argument order):
assert sorted_dict({'n1': [2, 3, 1], 'n2': [5, 1, 2], 'n3': [3, 2, 4]})=={'n1': [1, 2, 3], 'n2': [1, 2, 5], 'n3': [2, 3, 4]}


Tests:
assert sorted_dict({'n1': [25,37,41], 'n2': [41,54,63], 'n3': [29,38,93]})=={'n1': [25, 37, 41], 'n2': [41, 54, 63], 'n3': [29, 38, 93]}
assert sorted_dict({'n1': [58,44,56], 'n2': [91,34,58], 'n3': [100,200,300]})=={'n1': [44, 56, 58], 'n2': [34, 58, 91], 'n3': [100, 200, 300]}
Write a function to find the largest possible value of k such that k modulo x is y.

The function signature must exactly match the following example (same function name and argument order):
assert find_max_val(15, 10, 5) == 15


Tests:
assert find_max_val(187, 10, 5) == 185
assert find_max_val(16, 11, 1) == 12