Created
June 21, 2018 04:12
-
-
Save khanh96le/fda8ea78218a512456f256d287da396a to your computer and use it in GitHub Desktop.
This file contains hidden or 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
import json | |
import requests | |
ID = 'AGGRCOW' | |
url = 'http://spojtoolkit.com/src-drivers/ExecuteCodeOnAPI-driver.php' | |
with open('{}.txt'.format(ID), 'r') as f: | |
input = f.read() | |
data = { | |
'problemId': '{}'.format(ID), | |
'testInput': input, | |
'timeLimit': 1, | |
'type': 'codeTest', | |
'cache': 1 | |
} | |
r = requests.post(url, data=data) | |
print(r) | |
content = json.loads(r.content) | |
for key in content.keys(): | |
print(key, "\t", content[key]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment