罗莎琳德不接受“变量和一些算术”的助教

2024-09-30 22:15:27 发布

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

问题的链接http://rosalind.info/problems/ini2/

Given: Two positive integers a and b, each less than 1000.
Return: The integer corresponding to the square of the hypotenuse of the right triangle whose legs have lengths a and b

例如,For a, b = 3,4返回25

每次试验的数据集总是不同的。在

a=859
b=938
print( a**2 + b**2 )

我在我的电脑上试过这个代码,它成功了。但罗莎琳德不会接受的。这段代码可能有什么问题?在


Tags: andoftheintegers代码infohttp链接
1条回答
网友
1楼 · 发布于 2024-09-30 22:15:27

对我来说很好。你可能吧

1)在前几次尝试失败后没有输入正确的输入变量。在

2)使用答案框发布代码。在

如果您在http://rosalind.info/problems/ini2/中看到Notes部分 您会注意到,每次单击下载数据集时,数据集都会发生变化。在

另外,请记住,提供的默认框只供您输入答案,而不是代码本身。如果你想上传你的代码,你需要使用适当的代码上传工具,如注释部分的第二点所述。在

相关问题 更多 >