Divisibility 我们考虑删数字 首先我们可以发现有一类数很特殊就是大于 n / 2的素数, 因为这些素数的贡献只有1, 并且在n大的时候, 这些素数的个数不是很少, 我们可以最后用这些数去调整, 并且删掉一个数的时候删掉的是它的因子个数, 所以可以用素数去控制最后的数量.当n小的时候直接状压枚举. #include<bits/stdc++.h> #define LL long long #define fi first #define se second #define mk mak…
Divisibility by Eight time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output You are given a non-negative integer n, its decimal representation consists of at most 100 digits and doesn't contain…
题目:http://codeforces.com/problemset/problem/597/A Divisibility time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Find the number of k-divisible numbers on the segment [a, b]. In other words y…
题目链接:https://codeforces.com/contest/1368/problem/B 题意 构造最短的至少含有 $k$ 个 $codeforces$ 子序列的字符串. 题解 如下表: c o d e f o r c e s 子序列个数 个数 1 1 1 1 1 1 1 1 1 1 $1^{10}$ 2 2 2 2 2 2 2 2 2 2 $2^{10}$ 3 3 3 3 3 3 3 3 3 3 $3^{10}$ 依次构造每个字符的个数即可. 证明 c o d e…
C. Team time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Now it's time of Olympiads. Vanya and Egor decided to make his own team to take part in a programming Olympiad. They've been best fri…
J. Divisibility time limit per test 0.5 seconds memory limit per test 64 megabytes input standard input output standard output IT City company developing computer games invented a new way to reward its employees. After a new game release users start…