-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ZeroDivisionError: division by zero #11
Comments
分母为0了,看看你是不是输出有问题 |
我也是,请问解决了吗 |
|
你好,可以麻烦您发我一份最开始的吗?这个弄了挺久也没弄好。我的邮箱:2844957520@qq.com,谢谢您! |
+1,一样遇到这个问题 |
你好,我昨天已经解决了我的这个问题,不是版本的原因,是因为输入输出的问题,输入用数据集读入,输出和线上提交code的输出必须一样的方式,否则会报这个错误。除此之外,建议json文件中路径用全英文,否则后续会报gdk的错误。
希望我的回复能对你有所帮助,祝比赛顺利。
…---Original---
From: "Kong ***@***.***>
Date: Thu, Mar 25, 2021 11:11 AM
To: ***@***.***>;
Cc: ***@***.******@***.***>;
Subject: Re: [B1ACK917/2021HWAutoGrader] ZeroDivisionError: division by zero (#11)
+1,一样遇到这个问题
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
同与此问题,想问下输入用数据集读入的意思是,代码中直接打开txt的意思不? |
是的。
…---Original---
From: ***@***.***>
Date: Thu, Mar 25, 2021 15:25 PM
To: ***@***.***>;
Cc: ***@***.******@***.***>;
Subject: Re: [B1ACK917/2021HWAutoGrader] ZeroDivisionError: division by zero (#11)
你好,我昨天已经解决了我的这个问题,不是版本的原因,是因为输入输出的问题,输入用数据集读入,输出和线上提交code的输出必须一样的方式,否则会报这个错误。除此之外,建议json文件中路径用全英文,否则后续会报gdk的错误。 希望我的回复能对你有所帮助,祝比赛顺利。
…
---Original--- From: "Kong @.> Date: Thu, Mar 25, 2021 11:11 AM To: @.>; Cc: @.@.>; Subject: Re: [B1ACK917/2021HWAutoGrader] ZeroDivisionError: division by zero (#11) +1,一样遇到这个问题 — You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.
同与此问题,想问下输入用数据集读入的意思是,代码中直接打开txt的意思不?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
我使用python也遇到了这个问题。。我在config文件中设置了.py文件和数据集的.txt文件,并且写成了提交时相同的输出格式,但还是报错
|
那请问你读文件的时候改成了从数据集读吗?
…---Original---
From: ***@***.***>
Date: Fri, Mar 26, 2021 13:23 PM
To: ***@***.***>;
Cc: ***@***.******@***.***>;
Subject: Re: [B1ACK917/2021HWAutoGrader] ZeroDivisionError: division by zero (#11)
我使用python也遇到了这个问题。。我在config文件中设置了.py文件和数据集的.txt文件,并且写成了提交时相同的输出格式,但还是报错
Traceback (most recent call last): File "D:/OneDrive/OneDrive - zju.edu.cn/Huawei/2021HWAutoGrader/autograder.py", line 258, in <module> _ = grader(testCmd, d) File "D:/OneDrive/OneDrive - zju.edu.cn/Huawei/2021HWAutoGrader/autograder.py", line 219, in grader return os.path.split(ioData)[-1], hardCost, sum(energyCost), endTime - beginTime, sum(emptyRate) / len(emptyRate),\
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
请问,C++程序这个报错是什么问题。本地exe在别人机器上就能正常运行,求指点。
config.json内容如下:
The text was updated successfully, but these errors were encountered: