2017年4月27日

摘要: 输入一串周期性字符串,输出最小周期 样例输入:abcabcabc 样例输出:3 #include<stdio.h> #include<string.h> int main() { char word[100]; scanf("%s",word); int len=strlen(word); for( 阅读全文
posted @ 2017-04-27 22:55 LeeManXiao 阅读(82) 评论(0) 推荐(0)
 
摘要: 在Tex中左双引号是``,右双引号是”。输入一篇包含双引号的文章,将其转换成Tex格式。 样例输入:''To be or not to be,''quoth the Bard,''that is the question.'' 样例输出:``To be or not to be,”quoth the 阅读全文
posted @ 2017-04-27 22:31 LeeManXiao 阅读(34) 评论(0) 推荐(0)
 
摘要: 输入一个错位后敲出的字符串,输出打字员本想打出的句子。 样例输入:O S,GOMR YPFSU/ 样例输入:I AM FINE TODAY. 每输入一个字符,都可以直接输出一个字符。 ①使用if/switch语句,例如if(c=='w')putchar('q');但是太麻烦。 ②使用常量数组。 #i 阅读全文
posted @ 2017-04-27 21:51 LeeManXiao 阅读(121) 评论(0) 推荐(0)