yes
Time Limit: 1 seconds
Memory Limit: 128 MB
Rating: 800
Problem StatementSuper Mario has just obtained the fire flower! He now has the ability to throw fireballs! Super Mario throws $n$ fireballs. Each fireball lasts for 20 seconds. You are first given an integer $n$. You are then given an array $v$, which represents the velocity of the fireballs (in $m/s$). Determine the total distance travelled by the fireballs (in meters).
InputThe first line has an integer $n$ $(1 \le n \le 100)$. The next line contains $n$ integers from array $v$: the velocities of the $n$ fireballs. $(1 \le v_i \le 100$
OutputOutput the sum of the distances travelled by the fireballs in meters.
Sample CasesSample Input 1: 4 25 10 11 15 Sample Output 1: 1220 Sample Input 2: 15 21 8 5 38 26 98 15 23 4 28 23 86 31 3 71 Sample Output 2: 9600Explanation
The first fireball travels $25 * 20 = 500m$, Second = $200m$, Third = $220m$, Fourth = $300m$, Total = $500 + 200 + 220 + 300 = 1220m$.
SourcesKL Coding Cup March 2023 > Super Mario > Problem 1
Submit | Back