当前位置: 代码迷 >> 综合 >> Problem A:Biorhythms(中国剩余定理)
  详细解决方案

Problem A:Biorhythms(中国剩余定理)

热度:95   发布时间:2024-01-12 16:23:24.0

POJ1006http://poj.org/problem?id=1006

中国剩余定理(扩展欧几里德+中国剩余定理)

Description

Some people believe that there are three cycles in a person's life that start the day he or she is born. These three cycles are the physical, emotional, and intellectual cycles, and they have periods of lengths 23, 28, and 33 days, respectively. There is one peak in each period of a cycle. At the peak of a cycle, a person performs at his or her best in the corresponding field (physical, emotional or mental). For example, if it is the mental curve, thought processes will be sharper and concentration will be easier. 
Since the three cycles have different periods, the peaks of the three cycles generally occur at different times. We would like to determine when a triple peak occurs (the peaks of all three cycles occur in the same day) for any person. For each cycle, you will be

  相关解决方案