杭电acm1161题为什么是Presentation Error啊???请教大牛,谢谢啊
Eddy'smistakesTimeLimit:2000/1000MS(Java/Others)MemoryLimit:65536/32768K(Java/Others)...
Eddy's mistakes
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)
Total Submission(s): 3718 Accepted Submission(s): 2101
Problem Description
Eddy usually writes articles ,but he likes mixing the English letter uses, for example "computer science" is written frequently "coMpUtEr scIeNce" by him, this mistakes lets Eddy's English teacher be extremely discontentment.Now please you to write a procedure to be able in the Bob article English letter to turn completely the small letter.
Input
The input contains several test cases.each line consists a test case,Expressed Eddy writes in an article , by letter, blank space,numeral as well as each kind of punctuation
composition, the writing length does not surpass 1000 characters.
Output
For each test case, you should output an only line, after namely the result of transforms the lowercase letter.
Sample Input
weLcOmE tO HDOj Acm 2005!
Sample Output
welcome to hdoj acm 2005!
Author
eddy
Recommend
JGShining
代码是
#include<stdio.h>
main()
{
int i,n;
char ch[2000];
while(scanf("%d",&n)!=EOF){
gets(ch);
for(i=0;ch[i];i++)
if(ch[i]>='A'&&ch[i]<='Z')
ch[i]=ch[i]+32;
for(i=0;ch[i];i++)
printf("%c",ch[i]);
printf("\n");
}
} 展开
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)
Total Submission(s): 3718 Accepted Submission(s): 2101
Problem Description
Eddy usually writes articles ,but he likes mixing the English letter uses, for example "computer science" is written frequently "coMpUtEr scIeNce" by him, this mistakes lets Eddy's English teacher be extremely discontentment.Now please you to write a procedure to be able in the Bob article English letter to turn completely the small letter.
Input
The input contains several test cases.each line consists a test case,Expressed Eddy writes in an article , by letter, blank space,numeral as well as each kind of punctuation
composition, the writing length does not surpass 1000 characters.
Output
For each test case, you should output an only line, after namely the result of transforms the lowercase letter.
Sample Input
weLcOmE tO HDOj Acm 2005!
Sample Output
welcome to hdoj acm 2005!
Author
eddy
Recommend
JGShining
代码是
#include<stdio.h>
main()
{
int i,n;
char ch[2000];
while(scanf("%d",&n)!=EOF){
gets(ch);
for(i=0;ch[i];i++)
if(ch[i]>='A'&&ch[i]<='Z')
ch[i]=ch[i]+32;
for(i=0;ch[i];i++)
printf("%c",ch[i]);
printf("\n");
}
} 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询