diff --git a/HackerRank The Minion Game Solution b/HackerRank The Minion Game Solution new file mode 100644 index 0000000..6bc68d4 --- /dev/null +++ b/HackerRank The Minion Game Solution @@ -0,0 +1,11 @@ +def minion_game(s): + V = frozenset("AEIOU") + n = len(s) + ksc = sum(q for c, q in zip(s, range(n, 0, -1)) if c in V) + ssc = n * (n + 1) // 2 - ksc + if ksc > ssc: + print("Kevin {:d}".format(ksc)) + elif ssc > ksc: + print("Stuart {:d}".format(ssc)) + else: + print("Draw")