You are viewing a single comment's thread. Return to all comments →
import math import os import random import re import sys
def runningMedian(a):
if name == 'main': fptr = open(os.environ['OUTPUT_PATH'], 'w')
a_count = int(input().strip()) a = [] for _ in range(a_count): a_item = int(input().strip()) a.append(a_item) result = runningMedian(a) fptr.write('\n'.join(map(str, result))) fptr.write('\n') fptr.close()
Seems like cookies are disabled on this browser, please enable them to open this website
Find the Running Median
You are viewing a single comment's thread. Return to all comments →
import math import os import random import re import sys
def runningMedian(a):
if name == 'main': fptr = open(os.environ['OUTPUT_PATH'], 'w')