摘要: 如果是做作业的孩子找到了这里,希望不要直接copy,供参考,其实我做的也不一定好嘻嘻。 其实这里,我考虑了输出的排序问题, 所以用了数组保存,可能感觉挺繁琐的 = =。一般情况下大家都是直接while输出。 阅读全文
posted @ 2018-01-01 19:27 章鱼小年糕 阅读(278) 评论(0) 推荐(0) 编辑
摘要: 如果是做作业的孩子找到了这里,希望不要直接copy,供参考,其实我做的也不一定好嘻嘻。 阅读全文
posted @ 2018-01-01 19:26 章鱼小年糕 阅读(156) 评论(0) 推荐(0) 编辑
摘要: 这个题目是 输入A:创建自己名字的文件夹,如果有这个文件夹的话,就读取file1和file2的文件内容 输入B:获取当前用户对file1和file2文件权限 输入C:内容转为大写 输入D:计算连接和文件数目 输入E:计算文件空行数目 以下是我的代码: 阅读全文
posted @ 2018-01-01 19:24 章鱼小年糕 阅读(440) 评论(0) 推荐(0) 编辑
摘要: 备注:如果你是厂里的童鞋,写作业找到了这篇文章,希望你不要直接copy^_^,其实试着自己敲一遍会对你帮助很大。 题目要求是把student.txt内的成绩进行各个阶段的统计,文本格式都是"学号:成绩"。 下面是我的做法: 阅读全文
posted @ 2018-01-01 19:19 章鱼小年糕 阅读(666) 评论(0) 推荐(0) 编辑
摘要: 这个题,说实话我是好难想出来<-_<-,后来看了别人的思路才发现原来是理解为。 当对方要拿的时候,石头还剩下4个,那这个时候他拿几个,剩下的你都能一次拿了,也就是你赢了。 所以就要凑一个自己拿完的时候,刚好还剩下4个,也就是除以4要有余数,所以就有了答案。 阅读全文
posted @ 2017-11-08 19:40 章鱼小年糕 阅读(103) 评论(0) 推荐(0) 编辑
摘要: 693是一道很简单的题目。 阅读全文
posted @ 2017-10-26 19:06 章鱼小年糕 阅读(114) 评论(0) 推荐(0) 编辑
摘要: Assume you are an awesome parent and want to give your children some cookies. But, you should give each child at most one cookie. Each child i has a g 阅读全文
posted @ 2017-10-25 22:49 章鱼小年糕 阅读(101) 评论(0) 推荐(0) 编辑
摘要: #include #include #define MAX 10 typedef struct process { char name[10]; int priority; int ReachTime; int NeedTime; int UsedTime; char state; }PCB; int n=0; int pTime; PCB sta... 阅读全文
posted @ 2017-10-25 22:26 章鱼小年糕 阅读(911) 评论(0) 推荐(0) 编辑
摘要: You have a total of n coins that you want to form in a staircase shape, where every k-th row must have exactly k coins. Given n, find the total number 阅读全文
posted @ 2017-10-24 19:40 章鱼小年糕 阅读(113) 评论(0) 推荐(0) 编辑
摘要: Given a non-negative integer num, repeatedly add all its digits until the result has only one digit. For example: Given num = 38, the process is like: 阅读全文
posted @ 2017-10-24 19:07 章鱼小年糕 阅读(116) 评论(0) 推荐(0) 编辑