From 8a23b84f693bce90c3bf48ad1948128d919eade1 Mon Sep 17 00:00:00 2001 From: Gyubin Han <89185979+Gyubin-Han@users.noreply.github.com> Date: Tue, 7 May 2024 21:45:32 +0900 Subject: [PATCH] add: boj/2217.py --- boj/2217.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 boj/2217.py diff --git a/boj/2217.py b/boj/2217.py new file mode 100644 index 0000000..3613d4d --- /dev/null +++ b/boj/2217.py @@ -0,0 +1,15 @@ +n=int(input()) +arr=[] +mx=0 + +for _ in range(n): + arr.append(int(input())) + +arr.sort(reverse=True) +for i in range(n): + v=arr[i]*(i+1) + + if mx