Skip to content

Commit 5b114c5

Browse files
committed
fixed iterative_pair.py
1 parent 88de7cc commit 5b114c5

File tree

1 file changed

+3
-17
lines changed

1 file changed

+3
-17
lines changed

maths/iterative_pair.py

Lines changed: 3 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,5 @@
1-
import math
2-
import os
3-
import random
4-
import re
5-
import sys
6-
from collections import Counter
71
import doctest
8-
9-
#
10-
# Complete the 'sockMerchant' function below.
11-
#
12-
# The function is expected to return an INTEGER.
13-
# The function accepts following parameters:
14-
# 1. INTEGER n
15-
# 2. INTEGER_ARRAY ar
16-
#
2+
from collections import Counter
173

184

195
def sockMerchant(n, ar):
@@ -35,9 +21,9 @@ def sockMerchant(n, ar):
3521

3622
if __name__ == "__main__":
3723

38-
n = int(input("Enter length of array:- \n").strip())
24+
n = int(input().strip())
3925

40-
ar = list(map(int, input("Enter the elements: \n").rstrip().split()))
26+
ar = list(map(int, input().rstrip().split()))
4127

4228
result = sockMerchant(n, ar)
4329
print(result)

0 commit comments

Comments
 (0)