Comments (4)
感觉逻辑不对,假如说只有输入 5 0 ,你的代码是没有输出的,while循环一直在等待输入,没有中断,但题目要求的是输出“0 0”
from pat.
@mexbo 经验证,确实通过不了了。但是当时应该是通过的啊,我每次push都会检查的
不过,我代码里用的是
while(scanf("%d %d", &coef, &index) != EOF)
来判断输入结束,就是说不能判断回车,只能通过输入流/文件的结束来判断。测试的时候可以使用输入文件,或者使用Ctrl+D来结束输入。如果这个地方出问题的话我怀疑是PAT的测试设置有变化
from pat.
可能吧
from pat.
找到问题了,之前这样的输出方法
printf("%c%d %d", count++ ? ' ' : '\0', coef * index, index - 1);
是可以通过的,但是现在可能这个\0
的输出会造成问题。
具体原因我还不明白,输出的内容看起来是不会影响的,以后恐怕不能这么写了
from pat.
Related Issues (10)
- '{{ }}' in code is treated as Liquid tags by jekyll
- PAT Basic 1068: 判断逻辑错误
- 1090PATbasic部分正确 HOT 1
- 1003.c部分代码不理解 HOT 3
- 1009.c改进意见 HOT 1
- 关于PAT Basic Level 1008 HOT 1
- 乙级1052.数组下标错误 HOT 1
- pat题解网站打不开了 HOT 2
- 1052. 卖个萌 (20) HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pat.