随笔分类 -  母函数

摘要:1 /*小明开了一家糖果店。他别出心裁:把水果糖包成4颗一包和7颗一包的两种。糖果不能拆包卖。 2 3 小朋友来买糖的时候,他就用这两种包装来组合。当然有些糖果数目是无法组合出来的,比如要买 10 颗糖。 4 5 你可以用计算机测试一下,在这种包装情况下,最大不能买到的数量是17。大于17的任何数字都可以用4和7组合出来。 6 7 本题的要求就是在已知两个包装的数量时,求最大不能组合出的数字。 8 9 输入:10 两个正整数,表示每种包装中糖的颗数(都不多于1000)11 12 要求输出:13 一个正整数,表示最大不能买到的糖数14 15 不需要考虑无解的情况... 阅读全文
posted @ 2013-05-31 21:42 萧凡客 阅读(460) 评论(0) 推荐(0) 编辑
摘要:Problem DescriptionWe all know that Bin-Laden is a notorious terrorist, and he has disappeared for a long time. But recently, it is reported that he hides in Hang Zhou of China! “Oh, God! How terrible! ”Don’t be so afraid, guys. Although he hides in a cave of Hang Zhou, he dares not to go out. Laden 阅读全文
posted @ 2013-05-27 20:41 萧凡客 阅读(577) 评论(0) 推荐(0) 编辑
摘要:hdu 1938Problem DescriptionPeople in Silverland use square coins. Not only they have square shapes but also their values are square numbers. Coins with values of all square numbers up to 289 (=17^2), i.e., 1-credit coins, 4-credit coins, 9-credit coins, ..., and 289-credit coins, are available in Si 阅读全文
posted @ 2013-05-27 19:53 萧凡客 阅读(252) 评论(0) 推荐(0) 编辑