DSA-profesor
Teacher Dario is asking the N kids.Kid who get a D grade(grade 5 is the best) teacher will be spend a A[D] time.Write the program who will print how many time Dario will spend on asking and how much is average of grade.
InputIn the first line there is N(0<N<1000).In the next N lines there is D(0<D<=5)-grade.In the next 5 lines there is A[D].
OutputOutput the line where you should print how many time Dario will spend on asking and how much is average of grade.Note:If average 2 print 2,if 2,45 print 2,4.
Input
Output
2
5
4
10
15
1
2
10Output
12 4.5Submit solution
Coming laterThe grading service will be connected in a later migration step. You can inspect the task and your previous results now.