diff --git a/be/app.py b/be/app.py index 00f3e7d..eb9e897 100644 --- a/be/app.py +++ b/be/app.py @@ -53,20 +53,24 @@ def get_problem_description(_id: str): samples = json.loads(des[-1].replace("\n", "\\n")) samples_html = '' for s in samples: - _input = s["input"].strip().replace(" ", "  ").replace("\n", "
") - _output = s["output"].strip().replace(" ", "  ").replace("\n", "
") - str1 = '
' - str2 = '
' - str3 = '
Input

' - str4 = '
' + _input + '
' - str5 = '
' - str6 = '
' - str7 = '
Output

' - str8 = '
' + _output + '
' - str9 = '
' - str0 = '

' - samples_html = samples_html + str1 + str2 + str3 + str4 + str5 + str6 + str7 + str8 + str9 + str0 - return title + description + input_description + output_description + samples_html, 200 + _input = s["input"].strip().replace(" ", "  ").replace("\n", "
    ") + _output = s["output"].strip().replace(" ", "  ").replace("\n", "
    ") + # _input = s["input"].strip().replace(" ", "  ") + # _output = s["output"].strip().replace(" ", "  ") + stra = '
' + strb = '
' + strc = '
Input
' + strd = '
' + stre = '
Output
' + strf = '

' + strg = '
' + strh = '

    ' + _input + '
    
' + stri = '
' + strj = '

    ' + _output + '
    
' + strk = '
' + strl = '

' + samples_html = samples_html + stra + strb + strc + strd + stre + strf + strg + strh + stri + strj + strk + strl + return title + description + input_description + output_description + samples_html, 200 @app.route('/case_test/', methods=['POST'])