Easter Sunday

Write a program that prints which day is Easter Sunday of a given year
(remember that Easter Sunday is a mobile holiday that corresponds to the
first Sunday after the first full moon of the spring.

To solve this problem, use the Gauss method. The Gauss method to find
the day (D) and the month (M) that corresponds to the Easter Sunday of a
year (Y) is:

- Is computed ( indicates integer division and indicates the remainder
  of the integer division):

  1.  k := Y div 100

  2.  y := Y mod 19

  3.  b := Y mod 4

  4.  c := Y mod 7

  5.  q := k div 4

  6.  p := (13 + 8k) div 25

  7.  m := (15 − p + k − q) mod 30

  8.  d := (19y + m) mod 30

  9.  n := (4 + k − q) mod 7

  10. e := (2b + 4c + 6d + n) mod 7

- When d + e ≤ 9, then D := 22 + d + e and M := 3.

- When d = 29 and e = 6, then D := 19 and M := 4.

- When d = 28 and e = 6 and y > 10, then D := 18 and M := 4.

- Otherwise, D := d + e − 9 and M := 4.

Input

Input is a year (integer number) between 1800 and 9999.

Output

The output is two integer numbers in a line, separated by a slash. The
first is the day and the second is the month which correspond to the
Easter Sunday of the given year using Gauss method.

Problem information

Author: Unknown
Translator: Carlos Molina

Generation: 2026-01-25T10:15:04.989Z

© Jutge.org, 2006–2026.
https://jutge.org
