⌘K
Flycodx

Hackathon Prize Tier Distribution Calculator

Hackathon Prize Tier Distribution Calculator

MediumArrays0% accepted

Meera organizes Delhi hackathon with tiered prize pool. Top 3 teams get triple points, positions 4-6 get regular points, rest get half. Given scores array in descending order, calculate total prize money distributed across all tiers.

Approach

Given array of scores ranked in descending order, sum prizes where positions 0-2 multiply by 3, positions 3-5 by 1, remaining by 0.5.

Input

7 100 90 80 70 60 50 40

Output

1210
solution.py
Loading editor...
Test 1
Test 2
Test 3

Press Run to test your custom input, or Submit to judge against all test cases.

Sign in to continue

Create a free account to run code, submit solutions and track progress.

  • Free forever — no credit card
  • 10+ languages with live execution
  • Points, streaks & leaderboards
Auto Save OnLn 1, Col 1Spaces: 4UTF-8LFPython 3