随笔分类 -  数论(杂)

摘要:题:https://www.luogu.com.cn/problem/P4213 学习粗:https://blog.csdn.net/weixin_43914593/article/details/104229700 #include <bits/stdc++.h> using namespace 阅读全文
posted @ 2020-06-01 22:31 starve_to_death 阅读(228) 评论(0) 推荐(0)
摘要:bool vis[maxn]; int prime[maxn]; int Mob[maxn]; void Mobius_sieve(){ int cnt = 0; vis[1] = 1; Mob[1] = 1; for(int i = 2; i <= maxn; i++){ if(!vis[i]) 阅读全文
posted @ 2020-05-31 17:14 starve_to_death 阅读(147) 评论(0) 推荐(0)
摘要:A:https://ac.nowcoder.com/acm/contest/5555/A 分析:n个根号数的和等于m,求本质不同的方案数,对于m一顶满足m=a*√x,那么实际上就是a个球放入n个箱子中的整数划分问题,(箱子可为空)。 #include<bits/stdc++.h> using nam 阅读全文
posted @ 2020-05-18 22:32 starve_to_death 阅读(243) 评论(0) 推荐(0)
摘要:https://nanti.jisuanke.com/t/41299 分析:题目给出a,b,mod求满足条件的最小a,由题目的式子得,每次只要能递归下去,b就会+1,所以就可以认为b其实是次数,什么的次数?对数函数的反函数。。。。即题目求a的a次方的a次方.....一直搞b次后求得的答案。 #inc 阅读全文
posted @ 2019-09-02 18:53 starve_to_death 阅读(700) 评论(0) 推荐(0)
摘要:http://acm.hdu.edu.cn/contests/contest_showproblem.php?pid=1005&cid=867 #include<iostream> #include<cstring> #include<algorithm> #include<cstdio> #inc 阅读全文
posted @ 2019-07-16 19:01 starve_to_death 阅读(186) 评论(0) 推荐(0)
摘要:Input The first line of input contains a single integer P, (1 ≤ P ≤ 1000), which is the number of data sets that follow. Each data set should be proce 阅读全文
posted @ 2019-07-10 16:05 starve_to_death 阅读(316) 评论(0) 推荐(0)
摘要:一, 直角三角形a^2+b^2=c^2的a值奇偶数列法则: 定理1. 如a^2+b^2=c^2是直角三角形的三个整数边长,则必有如下a值的奇数列、偶数列关系成立; (一) 直角三角形a^2+b^2=c^2奇数列a法则: 若a表为2n+1型奇数(n=1、2、3 …), 则a为奇数列平方整数解的关系是: 阅读全文
posted @ 2019-04-15 21:32 starve_to_death 阅读(297) 评论(0) 推荐(0)