function remove_the_N_digit(num: number, N: number) {
let str: string = num.toString();
str = str.substring(0, N) + str.substring(N + 1);
return parseInt(str);
}
let num: number = 870615;
num = remove_the_N_digit(num, 3);
console.log(num);
/*
run:
87015
*/