Volume 09

401. Sum of squares of divisors

其中
其中.

402. Integer-valued polynomials

403. Lattice points enclosed by parabola and line

404. Crisscross Ellipses

405. A rectangular tiling

406. Guessing Game

407. Idempotents

一个很暴力的方法是考虑枚举, 那么显然, 于是可以枚举的约数, 用更新即可.

考虑另一个方向, 令, 那么当且仅当, 其中. 于是枚举, 以及枚举, 就可以算出, 然后就可以得到, 其中表示下的逆元.

408. Admissible paths through a grid

409. Nim Extreme

410. Circle and tangent line

411. Uphill paths

412. Gnomon numbering

413. One-child Numbers

414. Kaprekar constant

415. Titanic sets

416. A frog's trip

417. Reciprocal cycles II

418. Factorisation triples

419. Look and say sequence

420. positive integer matrix

421. Prime factors of

422. Sequence of points on a hyperbola

423. Consecutive die throws

424. Kakuro

425. Prime connection

显然在计算过程中, 用到的数的范围不会超过. 于是处理出以内的素数, 用dijkstra计算出通过relative关系到达的路径中最大值的最小值, 那么.

426. Box-ball system

427. -sequences

428. Necklace of circles

429. Sum of squares of unitary divisors

显然是一个积性函数, 可以得到. 分解阶乘质因数, 然后算下就好了.

430. Range flips

431. Square Space Silo

432. Totient sum

433. Steps in Euclid's algorithm

434. Rigid graphs

435. Polynomials of Fibonacci numbers

简单推导下可以得到. 关于取模, 可以用这个公式解决.

436. Unfair wager

437. Fibonacci primitive roots

438. Integer part of polynomial equation's solutions

439. Sum of sum of divisors

440. GCD and Tiling

441. The inverse summation of coprime couples

442. Eleven-free integers

443. GCD sequence

打表观察可以发现如果, 必然有. 如果已知, 那么下一个满足条件的可以这么确定: 找出的最小质因子, 那么下一个就是.

用这个方法跳到附近, 然后加上间隔就好了.

444. The Roundtable Lottery

445. Retractions A

446. Retractions B

447. Retractions C

448. Average least common multiple

化简下可以得到, 其中. 于是我们需要求, 的递推式可以变成

递归+记忆化计算即可.

449. Chocolate covered candy

450. Hypocycloid and Lattice points