随笔分类 - 数论
摘要:题意就是求n的k次方的前三位和后三位 - 后三位快速幂取模就行。 - 前三位,首先pow(n,k)=pow(10,k*lg(n)),此时可以看出pow(n,k)的值的位数是由k *lg(n)的整数部分决定,而值是由其小数部分决定,因此只取前三位的话让k *lg(n)的...
阅读全文
摘要:In mathematics, the nth harmonic number is the sum of the reciprocals of the first n natural numbers: In this problem, you are gi...
阅读全文
摘要:Goldbach's conjecture is one of the oldest unsolved problems in number theory and in all of mathematics. It states:Every even integer,...
阅读全文
浙公网安备 33010602011771号