UVa 1124在线判断python(呈现错误)

2024-10-01 11:25:58 发布

您现在位置:Python中文网/ 问答频道 /正文

这是我第一次尝试解决一个问题UVa1124 在UVa在线评判中使用Python和我不断得到表示错误。 根据website,它意味着

Presentation Error (PE): Your program outputs are correct but are not presented in the correct way. Check for spaces, justify, line feeds...

解决方案代码非常简单,它必须打印回输入。我尝试了下面这样的组合,但我一直碰到演示错误。 有人能帮忙吗?在

^{pr2}$

任何帮助或建议将不胜感激。谢谢


Tags: your错误noterrorwebsiteprogrampresentationoutputs
2条回答
from sys import stdin

for line in stdin:
    print(line, end="")

这是我的密码。在

它在实际输出行之间打印空白行。更改为

print(line, end="")

相关问题 更多 >