python 問題 不好意思請各位能協助我謝謝

(1) Input a number N, and then take the prime factorization N=PmQnRx…SyTz List these number P,Q,R, T, …, S,T and their power m, n, x, …, y, z

N = 294912 = 234562 Primes: 2, 4, 6 Powers: 3, 5, 2

(2) Input a number N, N= abcdef… xyz. Get a number M =zyx…fedcba Calculate these differences, (a-z), (b-y), (c-x), …, (x-c), (y-b), (z-a) Make a statistics over the absolute on these differences, For example, N= 12345, M = 54321 these differences: 4, 2, 0, 2, 4 4: 2; 2:2; 0:1 N= 1234554321, M = 1234554321 these differences: 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 0:10

是看不懂还是不会写