Skip to content

Commit 2b80ea7

Browse files
authored
Create Apple_and_Orange.py
1 parent 16144c5 commit 2b80ea7

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

Apple_and_Orange.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#!/bin/python3
2+
3+
import sys
4+
5+
6+
s,t = input().strip().split(' ')
7+
s,t = [int(s),int(t)]
8+
a,b = input().strip().split(' ')
9+
a,b = [int(a),int(b)]
10+
m,n = input().strip().split(' ')
11+
m,n = [int(m),int(n)]
12+
apple = len(list(filter(lambda x: int(x) + a <= t and int(x) + a >= s , input().strip().split(' '))))
13+
orange = len(list(filter(lambda x: int(x) + b <= t and int(x) + b >= s , input().strip().split(' '))))
14+
print(apple)
15+
print(orange)

0 commit comments

Comments
 (0)