Skip to content

Instantly share code, notes, and snippets.

@gauravkoradiya
Created April 19, 2020 12:56
Show Gist options
  • Save gauravkoradiya/a5d8ee52b6f80c8f5df75615db4bba81 to your computer and use it in GitHub Desktop.
Save gauravkoradiya/a5d8ee52b6f80c8f5df75615db4bba81 to your computer and use it in GitHub Desktop.
Codechef_DSA01 - Smart Phone - ZCO14003
"""https://www.codechef.com/LRNDSA01/problems/ZCO14003/"""
def main():
num_customer = int(input())
bgt_lst = sorted([int(input()) for i in range(num_customer)],reverse=True)
revenue = max([(index+1)*value for index,value in enumerate(bgt_lst)])
print(revenue)
if __name__ == '__main__':
main()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment