| # | Time | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 1345916 | kawhiet | Toys (CEOI18_toy) | C++20 | 0 ms | 344 KiB |
#include <bits/stdc++.h>
using namespace std;
#ifdef LOCAL
#include "debug.h"
#else
#define dbg(...) 47
#endif
int main() {
ios::sync_with_stdio(false);
cin.tie(nullptr);
int n;
cin >> n;
set<int> s;
for (int a = 1; a * a * a * a <= n; a++) {
if (n % a > 0) continue;
int x = n / a;
for (int b = a; b * b * b <= x; b++) {
if (x % b > 0) continue;
int y = x / b;
for (int c = b; c * c <= y; c++) {
if (y % c > 0) continue;
int d = y / c;
s.insert(a + b + c + d - 4);
}
}
}
cout << s.size() << '\n';
for (auto x : s) {
cout << x << ' ';
}
cout << '\n';
return 0;
}| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
