对策阿发西古兰经诵读视频得分

君,已阅读到文档的结尾了呢~~
基础工程A试卷答案及评分标准
扫扫二维码,随身浏览文档
手机或平板扫扫即可继续访问
基础工程A试卷答案及评分标准
举报该文档为侵权文档。
举报该文档含有违规或不良信息。
反馈该文档无法正常浏览。
举报该文档为重复文档。
推荐理由:
将文档分享至:
分享完整地址
文档地址:
粘贴到BBS或博客
flash地址:
支持嵌入FLASH地址的网站使用
html代码:
&embed src='/DocinViewer--144.swf' width='100%' height='600' type=application/x-shockwave-flash ALLOWFULLSCREEN='true' ALLOWSCRIPTACCESS='always'&&/embed&
450px*300px480px*400px650px*490px
支持嵌入HTML代码的网站使用
您的内容已经提交成功
您所提交的内容需要审核后才能发布,请您等待!
3秒自动关闭窗口分数裂项运算 A_百度文库
两大类热门资源免费畅读
续费一年阅读会员,立省24元!
分数裂项运算 A
上传于||暂无简介
阅读已结束,如果下载本文需要使用1下载券
想免费下载本文?
定制HR最喜欢的简历
下载文档到电脑,查找使用更方便
还剩3页未读,继续阅读
定制HR最喜欢的简历
你可能喜欢2014年数学建模竞赛评分细则(A题)_图文_百度文库
两大类热门资源免费畅读
续费一年阅读会员,立省24元!
2014年数学建模竞赛评分细则(A题)
上传于||暂无简介
阅读已结束,如果下载本文需要使用5下载券
想免费下载本文?
定制HR最喜欢的简历
你可能喜欢/*There is an objective test result such as ``OOXXOXXOOO&. An `O' means a correct answer of a problem and an `X' means a wrong answer. The score of each problem of this test is calculated by itself and its just previous consecutive `O's only when the answer is correct. For example, the score of the 10th problem is 3 that is obtained by itself and its two previous consecutive `O's.
Therefore, the score of ``OOXXOXXOOO& is 10 which is calculated by ``1+2+0+0+1+0+0+1+2+3&.
You are to write a program calculating the scores of test results.
Your program is to read from standard input. The input consists of T test cases. The number of test cases T is given in the first line of the input. Each test case starts with a line containing a string composed by `O' and `X' and the length of the string is more than 0 and less than 80. There is no spaces between `O' and `X'.
Your program is to write to standard output. Print exactly one line for each test case. The line is to contain the score of the test case.
The following shows sample input and output for five test cases.
Sample Input
OOXXOXXOOO
OOXXOOXXOO
OXOXOXOXOXOXOX
OOOOOOOOOO
OOOOXOOOOXOOOOX
Sample Output
#include&stdio.h&
int main()
int n,p=1,s=0,first=1;//用first,因为4的末尾也有换行符,避免输出0;所以用了first,还加了一次循环。 或者用周天猫说的直接再getchar一次即可。
scanf(&%d&,&n);
for(int i=1;i&=n+1;i++)
while((c=getchar())!='\n')
包括第一行4有有一个换行符。
用scanf(&%s&)也可 解决这个问题,因为末尾的|n。。scanf系统会自动认为是键入完的标志,会改成\0。所以循环条件改为\0标志即可。
//printf(&%c &,c);
if(c=='O')
else if(c=='X')p=1;
if(first) first=0;
else printf(&%d\n&,s);
参考知识库
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场
访问:108094次
积分:4024
积分:4024
排名:第5613名
原创:302篇
转载:15篇
(3)(5)(2)(2)(1)(2)(2)(10)(3)(23)(18)(6)(10)(34)(69)(67)(24)(37)

我要回帖

更多关于 阿发水槽 的文章

 

随机推荐