Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit ea163dc

Browse files
authored
Solution
1 parent adbe102 commit ea163dc

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
#!/bin/python3
2+
3+
import math
4+
import os
5+
import random
6+
import re
7+
import sys
8+
9+
# Complete the hurdleRace function below.
10+
def hurdleRace(k, height):
11+
maxi = max(height)
12+
if(maxi>k):
13+
return maxi-k
14+
return 0
15+
16+
if __name__ == '__main__':
17+
fptr = open(os.environ['OUTPUT_PATH'], 'w')
18+
19+
nk = input().split()
20+
21+
n = int(nk[0])
22+
23+
k = int(nk[1])
24+
25+
height = list(map(int, input().rstrip().split()))
26+
27+
result = hurdleRace(k, height)
28+
29+
fptr.write(str(result) + '\n')
30+
31+
fptr.close()

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /