Pandigital prime

Problem 41 Description We shall say that an n-digit number is pandigital if it makes use of all the digits 1 to n exactly once. For example, 2143 is a 4-digit pandigital and is also prime. What is the largest n-digit pandigital prime that exists? Solution 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24

Pandigital multiples

Problem 38 Description Take the number 192 and multiply it by each of 1, 2, and 3: 192 × 1 = 192 192 × 2 = 384 192 × 3 = 576 By concatenating each product we get the 1 to 9 pandigital, 192384576. We will call 192384576 the concatenated product of 192 and (1,2,3) The same can be achieved by starting with 9 and multiplying by 1, 2, 3,

Counting Sundays

Problem 19 Description You are given the following information, but you may prefer to do some research for yourself. 1 Jan 1900 was a Monday. Thirty days has September, April, June and November. All the rest have thirty-one, Saving February alone, Which has twenty-eight, rain or shine. And on leap years, twenty-nine. A leap year occurs on any year evenly divisible by 4, but not on century unless it is

Lab06_WriteUp

模型, 统计, 损失函数 损失函数 损失函数是我们用来确定我们模型的最佳参数的。 损失函数是对一个模型能够预测预期结果的程度的一种衡量。换句话说,它衡

Lab07_WriteUp

线性回归 先从一个图例来认识线性回归 下面用这个公式来实现线性回归 样例数据集 $$\hat{y_i} = \bar{y} + r \frac{SD(y)}{SD(x)} (x_i - \bar{x})$$ x 为账单,y 为小费 r为相关系数 1 2 3 4 5 6 x_bar = np.mean(tips["total_bill"]) y_bar