mirror of
https://github.com/TheAlgorithms/Python.git
synced 2025-02-07 10:00:55 +00:00
fixed iterative_pair.py
This commit is contained in:
parent
88de7ccff5
commit
5b114c5db5
|
@ -1,19 +1,5 @@
|
|||
import math
|
||||
import os
|
||||
import random
|
||||
import re
|
||||
import sys
|
||||
from collections import Counter
|
||||
import doctest
|
||||
|
||||
#
|
||||
# Complete the 'sockMerchant' function below.
|
||||
#
|
||||
# The function is expected to return an INTEGER.
|
||||
# The function accepts following parameters:
|
||||
# 1. INTEGER n
|
||||
# 2. INTEGER_ARRAY ar
|
||||
#
|
||||
from collections import Counter
|
||||
|
||||
|
||||
def sockMerchant(n, ar):
|
||||
|
@ -35,9 +21,9 @@ def sockMerchant(n, ar):
|
|||
|
||||
if __name__ == "__main__":
|
||||
|
||||
n = int(input("Enter length of array:- \n").strip())
|
||||
n = int(input().strip())
|
||||
|
||||
ar = list(map(int, input("Enter the elements: \n").rstrip().split()))
|
||||
ar = list(map(int, input().rstrip().split()))
|
||||
|
||||
result = sockMerchant(n, ar)
|
||||
print(result)
|
||||
|
|
Loading…
Reference in New Issue
Block a user