Closed renyumeng1 closed 6 months ago
请求参数如下:
{ "cmd": [ { "args": [ "/usr/bin/python3", "main.py" ], "env": [ "PATH=/usr/bin:/bin" ], "files": [ { "name": "stdout", "max": 10240, "content": "1 1\n" }, { "name": "stderr", "max": 10240 } ], "cpuLimit": 3000000000, "clockLimit": 4000000000, "memoryLimit": 104857600, "procLimit": 50, "cpuRate": 0.1, "copyIn": { "main.py": { "content": "a = input()\nprint(a)" } } } ] }
返回如下
[ { "status": "Nonzero Exit Status", "exitStatus": 1, "time": 60886044, "memory": 3592192, "runTime": 62178151, "files": { "stderr": "" } } ]
我只有在使用input()函数时会报错,其余时候都是正常的
你的 stdin 呢?files 应该是类似
files
[ {"content": "1 1\n"}, { "name": "stdout", "max": 10240 }, { "name": "stderr", "max": 10240 } ]
感谢作者大大的回答,我刚才在debug的时候发现了我content放错位置了
请求参数如下:
返回如下
我只有在使用input()函数时会报错,其余时候都是正常的