摘要: 题目:如果一个渔夫从2011年1月1日开始每三天打一次渔,两天晒一次网,编程实现当输入2011年1月1日以后的任意一天,输出该渔夫是在打渔还是在晒网。 结果 阅读全文
posted @ 2018-04-25 21:07 糖小俊 阅读(343) 评论(0) 推荐(0) 编辑
摘要: 结果 阅读全文
posted @ 2018-04-25 19:56 糖小俊 阅读(272) 评论(0) 推荐(0) 编辑
摘要: 1.顺序表的基本操作实践。 (1)建立4个元素的顺序表list[]={2,3,4,5},实现顺序表建立的基本操作。 (2)在list[]={2,3,4,5}的元素4和5之间插入一个元素9,实现顺序表插入的基本操作。 (3)在list[]={2,3,4,9,5}中删除指定位置(i=3)上的元素4,实现 阅读全文
posted @ 2018-04-13 23:02 糖小俊 阅读(16195) 评论(0) 推荐(0) 编辑
摘要: 阳阳买苹果,每个苹果0.8元,阳阳第一天买两个苹果,第二天开始每天买前一天的两倍,直到购买的苹果个数为不超过100的最大值,编程求阳阳每天平均花多少钱? 结果: 阅读全文
posted @ 2018-04-12 23:09 糖小俊 阅读(172) 评论(0) 推荐(0) 编辑
摘要: 猴子吃桃问题:猴子第一天摘下若干个桃子,当即吃了一半,还不过瘾,又多吃了一个。第二天早上又将第一天剩下的桃子吃掉一半,又吃了一个。以后每天早上都吃了前一天剩下的一半零一个。到第10天早上想再吃时,发现只剩下一个桃子了。编写程序求猴子第一天共摘了多少个桃子。 思路:开始时是从前往后想,先设第一天摘的桃 阅读全文
posted @ 2018-04-11 23:31 糖小俊 阅读(228) 评论(0) 推荐(0) 编辑
摘要: 好久没写过代码了,终于又要回来了,今天写了句名言勉励下自己。 “贵有恒,何必三更起五更睡;最无益,只怕一日曝十日寒” 没有将代码改为utf-8之前编译得到 将代码改为utf-8(运行chcp 65001)后编译得到: 阅读全文
posted @ 2018-04-09 17:56 糖小俊 阅读(247) 评论(2) 推荐(0) 编辑
摘要: A character string is said to have period k if it can be formed by concatenating one or more repetitions of another string of length k. For example, t 阅读全文
posted @ 2017-08-05 17:39 糖小俊 阅读(363) 评论(0) 推荐(0) 编辑
摘要: There are n pictures delivered for the new exhibition. The i-th painting has beauty ai. We know that a visitor becomes happy every time he passes from 阅读全文
posted @ 2017-08-04 21:53 糖小俊 阅读(288) 评论(0) 推荐(0) 编辑
摘要: 这道题想了小半天,后来经过大神指点后思路终于通了。 Hello everyone ,welcome to our programming match. This is your first task!!An organic compound is any member of a large clas 阅读全文
posted @ 2017-08-04 16:16 糖小俊 阅读(533) 评论(0) 推荐(0) 编辑
摘要: Some DNA sequences exist in circular forms as in the following figure, which shows a circular sequence ``CGAGTCAGCT", that is, the last symbol ``T" in 阅读全文
posted @ 2017-08-02 15:35 糖小俊 阅读(965) 评论(0) 推荐(0) 编辑