
数论:中国剩余定理
YRZ-James
who say you are not perfect?
展开
-
poj1006 生理周期
题目:Description人生来就有三个生理周期,分别为体力、感情和智力周期,它们的周期长度为23天、28天和33天。每一个周期中有一天是高峰。在高峰这天,人会在相应的方面表现出色。例如,智力周期的高峰,人会思维敏捷,精力容易高度集中。因为三个周期的周长不同,所以通常三个周期的高峰不会落在同一天。对于每个人,我们想知道何时三个高峰落在同一天。对于每个周期,我们会给出从当前年份的第一天开始,到...原创 2019-04-05 22:03:07 · 240 阅读 · 0 评论 -
51Nod - 1079 中国剩余定理
题目:一个正整数K,给出K Mod 一些质数的结果,求符合条件的最小的K。例如,K % 2 = 1, K % 3 = 2, K % 5 = 3。符合条件的最小的K = 23。Input第1行:1个数N表示后面输入的质数及模的数量。(2 <= N <= 10)第2 - N + 1行,每行2个数P和M,中间用空格分隔,P是质数,M是K % P的结果。(2 <= P <=...原创 2019-04-08 18:43:20 · 172 阅读 · 0 评论 -
POJ - 2891 Strange Way to Express Integers
题目:Elina is reading a book written by Rujia Liu, which introduces a strange way to express non-negative integers. The way is described as following:Choose k different positive integers a1, a2, …, ak...原创 2019-04-08 20:39:24 · 190 阅读 · 0 评论