From 163d02c455894a93d5c730222a1ded6e8cc039ea Mon Sep 17 00:00:00 2001 From: achintyatripathi <35167273+achintyatripathi@users.noreply.github.com> Date: Sun, 6 Oct 2019 16:14:43 +0530 Subject: [PATCH] BirthdayCakeCandles.py Birthday Cake Candles implementation in python --- Hackerrank/algorithms/Birthday Cake Candles.py | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 Hackerrank/algorithms/Birthday Cake Candles.py diff --git a/Hackerrank/algorithms/Birthday Cake Candles.py b/Hackerrank/algorithms/Birthday Cake Candles.py new file mode 100644 index 0000000..f066da0 --- /dev/null +++ b/Hackerrank/algorithms/Birthday Cake Candles.py @@ -0,0 +1,11 @@ +x = int(input().strip()) +y = list(map(int,input().strip().split(" ")[:x])) +y.sort() +p=0 + +temp = y[x-1] + +for i in range(len(y)): + if( temp==y[i]): + p+=1 +print(p)