The word TRIANGLE has eight different letters, which can be arranged themselves in 8! ways.
∴ Total number of permutations = 8!=40320.
Again, when T is fixed at the first place and E at the last place, the remaining six can be arranged themselves in 6! ways.
∴ The number of permutations which begin with T and end with E = 6! = 720
Now k=40320 and m=720
∴k8m=7