Created
September 4, 2017 00:38
-
-
Save Gabrielgtt/58e78ebd355f19b4fbcd76ae6fcde8f8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from itertools import izip | |
from os import system | |
from time import time | |
system("g++ 1253_Cifra_de_cesar.cpp -o 1253") | |
antes = time() | |
system("./1253 <input >output") | |
depois = time() | |
print "Execution time = {0:.5f}".format(depois - antes) | |
saida = open("output", "r") | |
correto = open("c_output", "r") | |
compare = 0 | |
if compare: | |
for i, linhas in enumerate(izip(saida.readlines(), correto.readlines())): | |
if linhas[0] != linhas[1]: | |
print "Erro encontrado na linha {0}".format(i+1) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment