fork download
  1. for (Y in c(2023, 2024, 2025, 2000, 2100)) {
  2. y <- Y + -100:100
  3. d <- 365 + (y %% 4 == 0 & (y %% 100 != 0 | y %% 400 == 0))
  4. s <- cumsum(d) %% 7
  5. cat(sprintf("%d: %s\n", Y, toString(y[s == s[101] & d == d[101] & y != Y])))
  6. }
Success #stdin #stdout 0.3s 39256KB
stdin
Standard input is empty
stdout
2023: 1933, 1939, 1950, 1961, 1967, 1978, 1989, 1995, 2006, 2017, 2034, 2045, 2051, 2062, 2073, 2079, 2090, 2102, 2113, 2119
2024: 1940, 1968, 1996, 2052, 2080, 2120
2025: 1930, 1941, 1947, 1958, 1969, 1975, 1986, 1997, 2003, 2014, 2031, 2042, 2053, 2059, 2070, 2081, 2087, 2098, 2110, 2121
2000: 1916, 1944, 1972, 2028, 2056, 2084
2100: 2010, 2021, 2027, 2038, 2049, 2055, 2066, 2077, 2083, 2094, 2106, 2117, 2123, 2134, 2145, 2151, 2162, 2173, 2179, 2190