fork(8) download
  1. def IanTaylorEasterJscr(metai):
  2. a = metai % 19
  3. b = metai >> 2
  4. c = b // 25 + 1
  5. d = (c * 3) >> 2
  6. e = ((a * 19) - ((c * 8 + 5) // 25) + d + 15) % 30
  7. e += (29578 - a - e * 32) >> 10
  8. e -= ((metai % 7) + b - d + e + 2) % 7
  9. d = e >> 5
  10. diena = e - d * 31
  11. menuo = d + 3
  12. return metai, menuo, diena
  13.  
  14. print "Velykų sekmadieniai:"
  15. for metai in range(2015, 2050):
  16. m, men, d = IanTaylorEasterJscr(metai)
  17. print "%d-%d-%d" % (m, men, d)
Success #stdin #stdout 0.01s 7736KB
stdin
Standard input is empty
stdout
Velykų sekmadieniai:
2015-4-5
2016-3-27
2017-4-16
2018-4-1
2019-4-21
2020-4-12
2021-4-4
2022-4-17
2023-4-9
2024-3-31
2025-4-20
2026-4-5
2027-3-28
2028-4-16
2029-4-1
2030-4-21
2031-4-13
2032-3-28
2033-4-17
2034-4-9
2035-3-25
2036-4-13
2037-4-5
2038-4-25
2039-4-10
2040-4-1
2041-4-21
2042-4-6
2043-3-29
2044-4-17
2045-4-9
2046-3-25
2047-4-14
2048-4-5
2049-4-18