This commit is contained in:
HuangHai
2025-08-30 18:35:01 +08:00
commit 1f397eca87
6258 changed files with 1487241 additions and 0 deletions

27
LuoGu/RuMen/P1851.cpp Normal file
View File

@@ -0,0 +1,27 @@
#include <bits/stdc++.h>
using namespace std;
int main() {
int s;
cin >> s;
for (int i = s;; i++) {
int a = 0, b = 0, a1 = 0, b1 = 0;
a = i;
for (int j = 1; j <= sqrt(a); j++) {
if (a % j == 0) a1 = a1 + j + a / j;
}
a1 = a1 - a;
b = a1;
for (int j = 1; j <= sqrt(b); j++) {
if (b % j == 0) b1 = b1 + j + b / j;
}
b1 = b1 - b;
if (a == b1 && a >= s && a != b) {
cout << a << " " << b;
return 0;
}
}
}