you are given an array A of K integers where Ai denotes page number of a book. To the score, you can either add or multiply the last digit of the page numbers.
you have to find the maximum score you can get.
The book contains N pages, also you need to follow the order in which the page numbers are given in the array, Initially, your score is 0.
first input: two space-separated integers N and K
second iNput:-K space-separated integers denoting the page number.
I/P- 50 3
2 35 23
O/P-30