Created
April 19, 2020 12:56
-
-
Save gauravkoradiya/a5d8ee52b6f80c8f5df75615db4bba81 to your computer and use it in GitHub Desktop.
Codechef_DSA01 - Smart Phone - ZCO14003
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"""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