数论
_君顾
这个作者很懒,什么都没留下…
展开
-
Leading and Trailing(快速幂+思维)
Leading and TrailingLightOJ - 1282You are given two integers: n and k, your task is to find the most significant three digits, and least significant three digits of nk.InputInput starts with an in...原创 2020-01-10 22:02:48 · 255 阅读 · 0 评论 -
Goldbach`s Conjecture(线性筛法)
Goldbach`s ConjectureLightOJ - 1259Goldbach’s conjecture is one of the oldest unsolved problems in number theory and in all of mathematics. It states:Every even integer, greater than 2, can be expr...原创 2020-01-10 21:35:05 · 524 阅读 · 1 评论 -
Harmonic Number (II) (规律题)
Harmonic Number (II)LightOJ - 1245I was trying to solve problem ‘1234 - Harmonic Number’, I wrote the following codelong long H( int n ) { long long res = 0; for( int i = 1; i <= n; i++ ...原创 2020-01-10 21:04:43 · 264 阅读 · 0 评论 -
Sigma Function(唯一分解定理)
Sigma FunctionLightOJ - 1336Sigma function is an interesting function in Number Theory. It is denoted by the Greek letter Sigma (σ). This function actually denotes the sum of all divisors of a numbe...原创 2020-01-09 18:15:58 · 1040 阅读 · 2 评论 -
Aladdin and the Flying Carpet (唯一分解定理)
Aladdin and the Flying CarpetLightOJ - 1341It’s said that Aladdin had to solve seven mysteries before getting the Magical Lamp which summons a powerful Genie. Here we are concerned about the first m...原创 2020-01-08 17:58:07 · 488 阅读 · 0 评论 -
Bi-shoe and Phi-shoe(欧拉函数)
Bi-shoe and Phi-shoeLightOJ - 1370Bamboo Pole-vault is a massively popular sport in Xzhiland. And Master Phi-shoe is a very popular coach for his success. He needs some bamboos for his students, so ...原创 2020-01-08 16:43:58 · 315 阅读 · 0 评论