kamakura 16 hours ago みんな大好きhaskellのコード。なにをしているかわかるかな? a1 = [x % у | x <- [1,3,5,7,8,10,12], y <- [1..31]] a2 = [x % y | x <- [2], y <- [1..28]] a3 = [x % y | x <- [4,6,9,11], y <- [1..30]] 365 - (length $ nub $ a1 ++ a2 ++ a3)
kamakura 17 hours ago function serialToDate(serial: number): Date { // 基準日:1900年1月0日(実質1899年12月31日) const epoch = new Date(1899, 11, 30); // シリアル値を日数に変換してミリ秒に const millisecondsPerDay = 24 * 60 * 60 * 1000; const offsetMilliseconds = serial * millisecondsPerDay; return new Date(epoch.getTime() + offsetMilliseconds); }