# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
828452 | shoryu386 | Toys (CEOI18_toy) | C++17 | 1 ms | 300 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <bits/stdc++.h>
using namespace std;
#define int long long
set<int> recur(int n){
set<int> ret;
for (int x = 2; x <= sqrt(n); x++){
if (n % x == 0) {
for (auto y : recur(n/x)){
ret.insert(x-1 + y);
}
}
}
return ret;
}
main(){
int n; cin >> n;
set<int> ans = recur(n); cout << ans.size() << '\n';
for (auto x : ans){
cout << x << ' ';
}
}
Compilation message (stderr)
# | 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... |