
数论——整除与同余
Alex_McAvoy
想要成为渔夫的猎手
展开
-
数论 —— 整除与同余
【整除】1.定义若qZ, s.t. b=a*q ,则称 b 被 a 整除,记作 a|b,其中,b 是 a 的倍数,a 是b 的约数。2.性质1)若 a|b 且 b|c,则:a|c2)若 a|b 且 a|c,对于x,yZ,有:a|(b*x+c*y)3)若 a|b 且m0,则:(m*a)|(m*b)4)若a|n 且 b|n,当x,yZ,满足...原创 2018-07-30 13:38:22 · 4383 阅读 · 0 评论 -
Integer Divisibility(LightOJ-1078)
Problem DescriptionIf an integer is not divisible by 2 or 5, some multiple of that number in decimal notation is a sequence of only a digit. Now you are given the number and the only allowable digi...原创 2019-02-13 23:23:43 · 252 阅读 · 0 评论 -
Maya Calendar(POJ-1008)
Problem DescriptionDuring his last sabbatical, professor M. A. Ya made a surprising discovery about the old Maya calendar. From an old knotted message, professor discovered that the Maya civilizati...原创 2018-08-09 13:31:36 · 380 阅读 · 0 评论 -
欧拉定理(洛谷-P5091)(扩展欧拉定理实现)
题目描述给你三个正整数,a,m,b,你需要求:a^b mod m输入输出格式输入格式:一行三个整数,a,m,b对于全部数据:1≤a≤10^91≤b≤10^{20000000}1≤m≤10^6输出格式:一个整数表示答案输入输出样例输入样例#1:2 7 4输出样例#1:2输入样例#2:998244353 12345 9876547210...原创 2019-08-17 10:53:01 · 608 阅读 · 0 评论 -
Fansblog(HDU-6608)
Problem DescriptionFarmer John keeps a website called ‘FansBlog’ .Everyday , there are many people visited this blog.One day, he find the visits has reached P , which is a prime number.He thinks it...原创 2019-09-29 16:34:59 · 265 阅读 · 0 评论