Code Python chấm trên Themis bị lỗi

Em chạy Themis trên máy ở trường chấm được nhưng về nhà chấm máy em lại bị lỗi này ạ

Code:

from math import sqrt
fi = open('uocchanle.inp','r')
fo = open('uocchanle.out','w')

t = int(fi.readline())

for _ in range(t):

    n = int(fi.readline())

    a = sqrt(n)

    if a == int(a):
        print("LE", file = fo)
    else:
        print("CHAN", file = fo)

fi.close()
fo.close()

Lỗi trong Themis:

■ DANH: 
● uocchanle: 0,00
uocchanle.py
;Mã nguồn Python được thông dịch!
◆ test01: 0,00
Chạy sinh lỗi
Command: "C:\Program Files (x86)\Themis\PYTHON\python.exe" "uocchanle.py" terminated with exit code: 3221225781 (Hexadecimal: C0000135)
◆ test02: 0,00
Chạy sinh lỗi
Command: "C:\Program Files (x86)\Themis\PYTHON\python.exe" "uocchanle.py" terminated with exit code: 3221225781 (Hexadecimal: C0000135)
◆ test03: 0,00
Chạy sinh lỗi
Command: "C:\Program Files (x86)\Themis\PYTHON\python.exe" "uocchanle.py" terminated with exit code: 3221225781 (Hexadecimal: C0000135)
◆ test04: 0,00
Chạy sinh lỗi
Command: "C:\Program Files (x86)\Themis\PYTHON\python.exe" "uocchanle.py" terminated with exit code: 3221225781 (Hexadecimal: C0000135)
◆ test05: 0,00
Chạy sinh lỗi
Command: "C:\Program Files (x86)\Themis\PYTHON\python.exe" "uocchanle.py" terminated with exit code: 3221225781 (Hexadecimal: C0000135)
◆ test06: 0,00
Chạy sinh lỗi
Command: "C:\Program Files (x86)\Themis\PYTHON\python.exe" "uocchanle.py" terminated with exit code: 3221225781 (Hexadecimal: C0000135)
◆ test07: 0,00
Chạy sinh lỗi
Command: "C:\Program Files (x86)\Themis\PYTHON\python.exe" "uocchanle.py" terminated with exit code: 3221225781 (Hexadecimal: C0000135)
◆ test08: 0,00
Chạy sinh lỗi
Command: "C:\Program Files (x86)\Themis\PYTHON\python.exe" "uocchanle.py" terminated with exit code: 3221225781 (Hexadecimal: C0000135)
◆ test09: 0,00
Chạy sinh lỗi
Command: "C:\Program Files (x86)\Themis\PYTHON\python.exe" "uocchanle.py" terminated with exit code: 3221225781 (Hexadecimal: C0000135)
◆ test10: 0,00
Chạy sinh lỗi
Command: "C:\Program Files (x86)\Themis\PYTHON\python.exe" "uocchanle.py" terminated with exit code: 3221225781 (Hexadecimal: C0000135)

You need to install Visual C++ redistributable.

  1. Download the appropriate version of vc_redist.x64.exe and place it in the folder containing your Dockerfile
  2. Edit your Dockerfile so you preinstall VC++ redistributables when you build your image by adding:FROM mcr.microsoft.com/windows/sservercore WORKDIR c:\mydir COPY “vc_redist.x64.exe” . RUN vc_redist.x64.exe /install /passive /norestart /log out.txt COPY mydir/myprogram.exe c:\mydirCMD [“c:\mydir\myprogram.exe”,“someparameter”]

Your application should run now.

Note: you need 64-bit build of VC++ redistributable and the appropriate version. You can find some download urls here

Link stackoverflow:

1 Like
83% thành viên diễn đàn không hỏi bài tập, còn bạn thì sao?