摘要:小a与黄金街道 链接:https://ac.nowcoder.com/acm/contest/317/D 题解: 附上欧拉函数模板: (1)直接求小于或等于n,且与n互质的个数: int Euler(int n) { int ret=n; for(int i=2;i<=sqrt(n);i++) if
阅读全文
摘要:GCD HDU - 1695 Given 5 integers: a, b, c, d, k, you're to find x in a...b, y in c...d that GCD(x, y) = k. GCD(x, y) means the greatest common divisor
阅读全文
摘要:Co-prime HDU - 4135 Given a number N, you are asked to count the number of integers between A and B inclusive which are relatively prime to N. Two int
阅读全文
摘要:Taxes CodeForces - 735D Mr. Funt now lives in a country with a very specific tax laws. The total income of mr. Funt during this year is equal to n (n
阅读全文
摘要:A Simple Math Problem HDU-1757 Lele now is thinking about a simple function f(x). If x < 10 f(x) = x. If x >= 10 f(x) = a0 * f(x-1) + a1 * f(x-2) + a2
阅读全文