随笔分类 -  数论

摘要:2014-07-3015:58:27DescriptionZ城市居住着很多只跳蚤。在Z城市周六生活频道有一个娱乐节目。一只跳蚤将被请上一个高空钢丝的正中央。钢丝很长,可以看作是无限长。节目主持人会给该跳蚤发一张卡片。卡片上写有N+1个自然数。其中最后一个是M,而前N个数都不超过M,卡片上允许有相同的... 阅读全文
posted @ 2014-07-30 16:02 daydaycode 阅读(220) 评论(0) 推荐(0)
摘要:InputOutputSample Input35 3 4 15 3 110 2 2 7 3 3100 1 1 100 1 2Sample Output4350超时代码,因为K很大 1 /***************** 2 f1+(k1-1)*d1=f2+(k2-1)*d2 3 => (k1-... 阅读全文
posted @ 2014-07-29 12:33 daydaycode 阅读(216) 评论(0) 推荐(0)
摘要:Problem DescriptionThe expression N!, read as "N factorial," denotes the product of the first N positive integers, where N is nonnegative. So, for exa... 阅读全文
posted @ 2014-05-06 21:21 daydaycode 阅读(405) 评论(0) 推荐(0)