摘要:
中国剩余定理(CRT)的表述如下 设正整数两两互素,则同余方程组 有整数解。并且在模下的解是唯一的,解为 其中,而为模的逆元。 代码: [cpp] view plain copy int CRT(int a[],int m[],int n) { int M = 1; int ans = 0; for 阅读全文
摘要:
Humble Numbers Time Limit:1000MS Memory Limit:32768KB 64bit IO Format:%I64d & %I64u Description A number whose only prime factors are 2,3,5 or 7 is ca 阅读全文