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

View File

@@ -0,0 +1,14 @@
#include <bits/stdc++.h>
using namespace std;
int main() {
int s;
cin >> s;
for (int i = 1; i <= 5; i++) {
int x;
cin >> x;
s -= x;
}
cout << s << endl;
return 0;
}

View File

@@ -0,0 +1,15 @@
#include <bits/stdc++.h>
using namespace std;
int s, c, r;
int main() {
cin >> s >> c >> r;
for (int b = r + 1;; b++) {
int a = s - b - c - r;
if (a / b == c && a % b == r && a + b + c + r == s) {
printf("%d %d", a, b);
break;
}
}
return 0;
}