mirror of
https://github.com/TheAlgorithms/Python.git
synced 2025-02-07 18:10: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
|
import doctest
|
||||||
|
from collections import Counter
|
||||||
#
|
|
||||||
# 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
|
|
||||||
#
|
|
||||||
|
|
||||||
|
|
||||||
def sockMerchant(n, ar):
|
def sockMerchant(n, ar):
|
||||||
|
@ -35,9 +21,9 @@ def sockMerchant(n, ar):
|
||||||
|
|
||||||
if __name__ == "__main__":
|
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)
|
result = sockMerchant(n, ar)
|
||||||
print(result)
|
print(result)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user