华东师范大学计算机机试真题.doc

  1. 1、本文档共57页,可阅读全部内容。
  2. 2、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
  3. 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载
  4. 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
华东师范大学计算机机试真题

2009机试 2 计算和的数位 2 大写改小写 3 素数对 4 求最大公约数和最小公倍数 6 排序后求位置处的数 7 *路由器连接 8 *编译原理 10 *分开连接 13 2010机试 17 ECNU的含义 17 空瓶换啤酒 18 统计字符 20 2010机试热身 21 粽子买三送一,买五送二 21 工程流水线问题 22 2011机试 24 hello world 24 Special judge 26 查询成绩 28 2011机试热身 30 贪吃蛇 30 仰望星空 34 *编辑距离 36 2012机试 38 字母排序 38 幸运数 39 十六进制的加法 42 电话号码簿合并排序 42 *五子棋 43 *正则表达式匹配 45 2013机试 46 斐波那契数列的素数个数 46 *将a字符变成b字符最少修改次数 47 2013机试热身 49 去重排序 49 蛇形图案 51 数学手稿 54 2009机试 计算和的数位 Sum of digit Description Write a program which computes the digit number of sum of two integers a and b. Input The first line of input gives the number of cases, N(1 ≤ N ≤ 100). N test cases follow. Each test case consists of two integers a and b which are separeted by a space in a line. (0=a,b=100000000). Output For each test case, print the number of digits of a + b. Sample Input 3 5 7 1 99 1000 999 Sample Output 2 3 4 #includestdio.h int main() { int n; int a,b; int sum; while(scanf(%d,n)!=EOF) { while(n--) { int an=0; scanf(%d%d,a,b); sum=a+b; while(sum) { an++; sum/=10; } printf(%d\n,an++); } } return 0; } 大写改小写 Capitalize Description Write a program which replace all the lower-case letters of a given text with the corresponding captital letters. Input A text including lower-case letters, periods, and space. Output Output The converted text. Sample Input welcome to east china normal university. Sample Output WELCOME TO EAST CHINA NORMAL UNIVERSITY. #includestdio.h #includestring.h char str[1000]; int main() { int l; while(gets(str)) { l=strlen(str); int i; for(i=0;il;i++) { if(str[i]=astr[i]=z) printf(%c,str[i]-32); else printf(%c,str[i]); } printf(\n); } return 0; } 素数对 Primes Pair Description We arrange the numbers between 1 and N (1 = N = 10000) in increasing order and decreasing order like this: 1 2 3 4 5 6 7 8 9 . . . N N . . . 9 8 7 6 5 4 3 2 1 Two numbers faced each other form a pair. Your task is to compute the number of pairs P such that both numbers in the pairs are prime. Input The first line of input giv

文档评论(0)

138****7331 + 关注
实名认证
内容提供者

该用户很懒,什么也没介绍

1亿VIP精品文档

相关文档