数论
little-fairy
卡题是一种幸福~
展开
-
HDU4135 Co-(容斥定理)
题目:DescriptionGiven a number N, you are asked to count the number of integers between A and B inclusive which are relatively prime to N.Two integers are said to be co-prime or relatively prime if they...原创 2018-06-10 14:33:59 · 178 阅读 · 0 评论 -
简单的快速幂模板
#include<stdio.h>#include<stdlib.h>#include<math.h>#include<iostream>using namespace std;long long quickmi(long long a,long long b,long long p){ long long ans=1; ...原创 2018-07-22 10:43:22 · 134 阅读 · 0 评论 -
64位整数乘法
#include<stdio.h>#include<stdlib.h>#include<math.h>#include<iostream>using namespace std;///计算(x*y)mod z 的值long long mul(long long x,long long y,long z){ long long ...原创 2018-07-22 11:26:31 · 602 阅读 · 0 评论