you give 0indexed array num n integer integer kThe kradius average subarray nums center index radius k average element num indice k k inclusive if k elements index kradius average 1Build return array avgs length n avgsi kradius average subarray center index iThe average x element sum x element divide x integer division the integer division truncate zero mean lose fractional partfor example average element 2 3 1 5 2 3 1 5 4 11 4 275 truncate 2 example 1input num 743918526 k 3Output 111544111explanation avg0 avg1 avg2 1 k element index the sum subarray center index 3 radius 3 7 4 3 9 1 8 5 37 use integer division avg3 37 7 5 for subarray center index 4 avg4 4 3 9 1 8 5 2 7 4 for subarray center index 5 avg5 3 9 1 8 5 2 6 7 4 avg6 avg7 avg8 1 k element indexexample 2input num 100000 k 0output 100000explanation the sum subarray center index 0 radius 0 100000 avg0 100000 1 100000example 3input num 8 k 100000output 1explanation avg0 1 k element index 0 Constraintsn numslength1 n 1050 numsi k 105