Ejemplo n.º 1
0
def everything():
    testCases = io_helper.get_input()
    numCases = testCases[0]
    testCases.pop(0)

    io_helper.prep_output()

    for i in xrange(0, len(testCases)):
        io_helper.write_output(i, b(testCases[i]))
Ejemplo n.º 2
0
def fractiles():
	testCases = io_helper.get_input()
	numTestCases = testCases[0]
	testCases.remove(numTestCases)
	output_filename = 'output.txt'

	io_helper.prep_output()

	for i in xrange(0, len(testCases)):
		testCase = testCases[i].split(' ')
		spotsToCheck = findSpotsToCheck(int(testCase[0]), int(testCase[1]), int(testCase[2]))

		io_helper.write_output(i, spotsToCheck)
Ejemplo n.º 3
0
import io_helper


def a(str):
    new_str = ""
    for i in xrange(0, len(str)):
        char = str[i]
        if i == 0:
            new_str = new_str + str[i]
        else:
            if str[i] < new_str[0]:
                new_str = new_str + str[i]
            else:
                new_str = str[i] + new_str
    return new_str.strip()


testCases = io_helper.get_input()
numCases = testCases[0]
testCases.pop(0)

io_helper.prep_output()

for i in xrange(0, len(testCases)):
    io_helper.write_output(i, a(testCases[i]))
Ejemplo n.º 4
0
def o():
    io_helper.prep_output()

    for i in xrange(0, len(testCases)):
        io_helper.write_output(i, b(testCases[i]))