Codeforces - 1152C - Neko does Maths
地址https://codeforces.com/contest/1152/problem/C原文地址https://www.lucien.ink/archives/423/题意给你 $a$ 和 $b$ ,找到一个最小的 $k$ ,使得 $lcm(a + k, b + k)$ 最小。题解不妨设 $a > b$ ,则有:枚举 $a - b$ 的所有因子即可。代码https://paste...
地址https://codeforces.com/contest/1152/problem/C原文地址https://www.lucien.ink/archives/423/题意给你 $a$ 和 $b$ ,找到一个最小的 $k$ ,使得 $lcm(a + k, b + k)$ 最小。题解不妨设 $a > b$ ,则有:枚举 $a - b$ 的所有因子即可。代码https://paste...
题目链接http://poj.org/problem?id=2689题目DescriptionThe branch of mathematics called number theory is about properties of numbers. One of the areas that has captured the interest of number theoreticians...
题目链接http://codeforces.com/contest/987/problem/B题目Year 2118. Androids are in mass production for decades now, and they do all the work for humans. But androids have to go to school to be able to sol...
题解链接题目链接https://arc060.contest.atcoder.jp/tasks/arc060_b题目Problem StatementFor integers b(b≥2) and n(n≥1), let the function f(b,n) be defined as follows:$f(b,n)=n$, when $n<b$$f(b,n)=f(b, floor(...
简介 BSGS算法,原名Baby Steps Giant Steps,又名大小步算法,拔山盖世算法,北上广深算法——by SLYZoier,数论基本算法之一。问题 给定$A,B,C$,求满足 $A^x \equiv B\ (mod\ C)$ 的最小非负整数$x$。模板#include <bits/stdc++.h> typedef lo...