We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
1010题有点小问题,提交只是部分正确
The text was updated successfully, but these errors were encountered:
感觉逻辑不对,假如说只有输入 5 0 ,你的代码是没有输出的,while循环一直在等待输入,没有中断,但题目要求的是输出“0 0”
Sorry, something went wrong.
@mexbo 经验证,确实通过不了了。但是当时应该是通过的啊,我每次push都会检查的
不过,我代码里用的是
while(scanf("%d %d", &coef, &index) != EOF)
来判断输入结束,就是说不能判断回车,只能通过输入流/文件的结束来判断。测试的时候可以使用输入文件,或者使用Ctrl+D来结束输入。如果这个地方出问题的话我怀疑是PAT的测试设置有变化
可能吧
ad6e5a4
找到问题了,之前这样的输出方法
printf("%c%d %d", count++ ? ' ' : '\0', coef * index, index - 1);
是可以通过的,但是现在可能这个\0的输出会造成问题。
\0
具体原因我还不明白,输出的内容看起来是不会影响的,以后恐怕不能这么写了
No branches or pull requests
1010题有点小问题,提交只是部分正确
The text was updated successfully, but these errors were encountered: