Codeforces Round 942 (Div. 2)

A. Contest Proposal

思路:

时间复杂度:

B. Coin Games

思路:

时间复杂度:

C. Permutation Counting

思路:

时间复杂度:

1

D1. Reverse Card (Easy Version)

思路:

时间复杂度:

1
2
3
4
5
6
7
8
9
10
void solve() {
int n, m;
std::cin >> n >> m;

i64 ans = 0;
for (int i = 1; i <= m; i++) {
ans += (n + i) / i / i;
}
std::cout << ans - 1 << "\n";
}