Question: Aon Online Assessment (OA) Coding Question Solved
1
Entering edit mode

Question 1: Maximum Number of Games

Problem Statement:

Anna plays video games every day. To complete one game, Anna requires 10 minutes. She has N days to play the game. On each ith day, she has A[i] free hours. Find the maximum number of games that she can complete in N days.

Input Format:

The input consists of two lines:

  • The first line contains a single integer N denoting the number of days.

  • The second line contains N space-separated integers denoting the number of free hours.

Output Format:

Print the maximum number of games Anna can play in N days.

Example 1:

Input:

3

2 4 5

Output:

66

Explanation:

  • On the first day, Anna has 2 free hours (120 minutes). She will play 12 games.

  • On the second day, she has 4 free hours (240 minutes). She will play 24 games.

  • On the third day, she has 5 free hours (300 minutes). She will play 30 games.

  • Total = 12 + 24 + 30 = 66 games.

Sample Case 2:

Input:

2

11 12

Output:

138

ADD COMMENTlink 2 hours ago admin 1.8k

Login before adding your answer.

Similar Posts
Loading Similar Posts