摘要:
数论的题目中会涉及一些中国剩余定理的问题,会给你一些互质的数,比如a, b, c. 然后呢,有一个n,说这个n对a取余为dd, n对b取余为ff, n对c取余为gg. 现在让你来计算这个n的最小数值。 解法如下: x = (a 与 b 的某个公倍数) % c = = 1; y = (b 与 c 的... 阅读全文
posted @ 2014-08-06 14:23
我喜欢旅行
阅读(181)
评论(0)
推荐(0)
摘要:
Problem 1402 猪的安家 Accept: 984Submit: 5945Time Limit: 1000 mSecMemory Limit : 32768 KB Problem DescriptionAndy和Mary养了很多猪。他们想要给猪安家。但是Andy没有足够的猪圈,很多猪只能够... 阅读全文
posted @ 2014-08-06 11:21
我喜欢旅行
阅读(212)
评论(0)
推荐(0)
摘要:
Rightmost Digit Time Limit:1000MS Memory Limit:32768KB 64bit IO Format:%I64d & %I64uDescriptionGiven a positive integer N, you... 阅读全文
posted @ 2014-08-06 10:41
我喜欢旅行
阅读(218)
评论(0)
推荐(0)