我为我的作业编写了一个简单的 python 程序,它希望我们将输入的三个整数相加。我将它提交给我学校的 oj(在线法官)系统,但我收到了“编译器错误”
该程序在运行 ubuntu 18.04 amd64 的个人计算机上运行良好,但我无法通过 oj 测试。我真的不知道出了什么问题,因为 oj 没有给出任何消息,只有最终状态“编译器错误”
import sys
a = input()
b = input()
c = input()
a = int(a)
b = int(b)
c = int(c)
answer = a + b + c
print(f"The answer is {answer}")
这是我在计算机上运行程序时的结果:
ubuntu@VMware:~/python-intro $ python3 1003.py
3
4
5
The answer is 12
和我的电脑系统:
ubuntu@VMware:~/python-intro $ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 18.04.1 LTS
Release: 18.04
Codename: bionic
怎么会是 oj 上的编译器错误?我已经确认我的提交语言是“python 3”而不是“python 2”或其他语言。
湖上湖
ITMISS
慕桂英546537
相关分类