没有合适的资源?快使用搜索试试~ 我知道了~
首页华东师范大学考研计算机复试机试习题.pdf
华东师范大学考研计算机复试机试习题.pdf
需积分: 34 2.4k 浏览量
更新于2023-05-31
评论 8
收藏 2.19MB PDF 举报
华东师范大学考研计算机复试机试习题,上机考试题目,包含代码。使用C语言编写的代码。考试之前可以练习和熟悉题目,成功经验分享给大家。
资源详情
资源评论
资源推荐

华东师范大学计算机考研复试机试习题

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
#include<stdio.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.
#include<stdio.h>
#include<string.h>
char str[1000];
int main()
{
int l;
while(gets(str))
{
l=strlen(str);
int i;
for(i=0;i<l;i++)
{
if(str[i]>='a'&&str[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 gives the number of cases, C (1 ≤ C ≤ 100). C test cases follow.
Each test case consists of an integer N in one line.
Output
For each test case, output P .
Sample Input
4
1
4
7
51
Sample Output
0
2
2
6
#include<stdio.h>
#include<string.h>
bool prime[10005];
void init()
{
剩余56页未读,继续阅读

















yxdydSky
- 粉丝: 15
- 资源: 4
上传资源 快速赚钱
我的内容管理 收起
我的资源 快来上传第一个资源
我的收益
登录查看自己的收益我的积分 登录查看自己的积分
我的C币 登录后查看C币余额
我的收藏
我的下载
下载帮助

会员权益专享
最新资源
- Xilinx SRIO详解.pptx
- Informatica PowerCenter 10.2 for Centos7.6安装配置说明.pdf
- 现代无线系统射频电路实用设计卷II 英文版.pdf
- 电子产品可靠性设计 自己讲课用的PPT,包括设计方案的可靠性选择,元器件的选择与使用,降额设计,热设计,余度设计,参数优化设计 和 失效分析等
- MPC5744P-DEV-KIT-REVE-QSG.pdf
- 通信原理课程设计报告(ASK FSK PSK Matlab仿真--数字调制技术的仿真实现及性能研究)
- ORIGIN7.0使用说明
- 在VMware Player 3.1.3下安装Redhat Linux详尽步骤
- python学生信息管理系统实现代码
- 西门子MES手册 13 OpcenterEXCR_PortalStudio1_81RB1.pdf
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈



安全验证
文档复制为VIP权益,开通VIP直接复制

评论0