c语言学习
wuxm_
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
数据类型的范围
速查表: char -128 ~ +127 (1 Byte) short -32767 ~ + 32768 (2 Bytes) unsigned short 0 ~ 65536 (2 Bytes) int -2147483648 ~ +2147483647 (4 Bytes) unsigned int 0 ~ 4294967295 (4 Bytes) long == int转载 2015-12-14 18:30:22 · 246 阅读 · 0 评论 -
cantor表
Description 现代数学的著名证明之一是Georg Cantor证明了有理数是可枚举的。他是用下面这一张表来证明这一命题的: 1/1 1/2 1/3 1/4 1/5 … 2/1 2/2 2/3 2/4 … 3/1 3/2 3/3 … 4/1 4/2 … 5/1 … … 我们以Z字形给上表的每一项编号。第一项是1/1,然后是1/2,2/1,3/1,2/2,… 输入:n 输出:表原创 2015-12-14 19:49:38 · 469 阅读 · 0 评论 -
两道桶排序题
问题一:描述: Input a couple of numbers (0~100) and end of EOF. If number > 20, it shuold be mapped to [0, 20],whitch is mean 'number %= 21' Output all these numbers by ascending oder. Output for原创 2015-12-14 15:45:54 · 400 阅读 · 0 评论 -
进制转换
问题一:十进制转其他进制 将十进制数n转换成m进制数 m n 样例输入 Sample Input 样例1:10 2 样例2:100 15 样例输出 Sample Output 样例1:1010 样例2:6A hint:用反向取余法,注意n的范围。 代码:#include int main(){ int n,i,m,a[8]={0},l=7;//l原创 2015-12-15 21:44:16 · 415 阅读 · 0 评论 -
递推1
题目描述 Description 我们要求找出具有下列性质数的个数(包含输入的自然数n): 先输入一个自然数n(n 1. 不作任何处理; 2. 在它的左边加上一个自然数,但该自然数不能超过原数的一半; 3. 加上数后,继续按此规则进行处理,直到不能再加自然数为止. 输入描述 Input Description 一原创 2015-12-15 22:19:10 · 301 阅读 · 0 评论 -
各类型所占字节
转自:http://blog.youkuaiyun.com/lyl0625/article/details/7350045转载 2016-01-04 00:21:52 · 1502 阅读 · 0 评论
分享