# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
367909 | 2021-02-18T19:37:09 Z | ogibogi2004 | Toys (CEOI18_toy) | C++14 | 2297 ms | 85764 KB |
#include<bits/stdc++.h> using namespace std; #define ll long long ll n; unordered_set<int>v[100000]; int main() { cin>>n; vector<ll>d; for(ll i=1;i*i<=n;i++) { if(n%i==0) { d.push_back(i); if(i*i!=n) { d.push_back(n/i); } } } sort(d.begin(),d.end()); v[0].insert(0); for(int i=0;i<d.size();i++) { for(int j=i+1;j<d.size();j++) { if(d[j]%d[i]!=0)continue; for(auto xd:v[i]) { v[j].insert(xd+d[j]/d[i]-1); } } } vector<int>ans; for(auto xd:v[d.size()-1]) { ans.push_back(xd); } sort(ans.begin(),ans.end()); cout<<ans.size()<<endl; for(auto xd:ans) { cout<<xd<<" "; } cout<<endl; return 0; }
Compilation message
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 5 ms | 5740 KB | Output is correct |
2 | Correct | 4 ms | 5740 KB | Output is correct |
3 | Correct | 4 ms | 5740 KB | Output is correct |
4 | Correct | 4 ms | 5740 KB | Output is correct |
5 | Correct | 4 ms | 5740 KB | Output is correct |
6 | Correct | 4 ms | 5740 KB | Output is correct |
7 | Correct | 4 ms | 5740 KB | Output is correct |
8 | Correct | 5 ms | 5740 KB | Output is correct |
9 | Correct | 5 ms | 5740 KB | Output is correct |
10 | Correct | 5 ms | 5740 KB | Output is correct |
11 | Correct | 6 ms | 5740 KB | Output is correct |
12 | Correct | 4 ms | 5740 KB | Output is correct |
13 | Correct | 4 ms | 5740 KB | Output is correct |
14 | Correct | 4 ms | 5740 KB | Output is correct |
15 | Correct | 4 ms | 5740 KB | Output is correct |
16 | Correct | 4 ms | 5740 KB | Output is correct |
17 | Correct | 4 ms | 5740 KB | Output is correct |
18 | Correct | 5 ms | 5792 KB | Output is correct |
19 | Correct | 4 ms | 5740 KB | Output is correct |
20 | Correct | 5 ms | 5740 KB | Output is correct |
21 | Correct | 4 ms | 5740 KB | Output is correct |
22 | Correct | 4 ms | 5740 KB | Output is correct |
23 | Correct | 4 ms | 5760 KB | Output is correct |
24 | Correct | 5 ms | 5868 KB | Output is correct |
25 | Correct | 4 ms | 5740 KB | Output is correct |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 5 ms | 5740 KB | Output is correct |
2 | Correct | 4 ms | 5740 KB | Output is correct |
3 | Correct | 4 ms | 5740 KB | Output is correct |
4 | Correct | 4 ms | 5740 KB | Output is correct |
5 | Correct | 4 ms | 5740 KB | Output is correct |
6 | Correct | 4 ms | 5740 KB | Output is correct |
7 | Correct | 4 ms | 5740 KB | Output is correct |
8 | Correct | 5 ms | 5740 KB | Output is correct |
9 | Correct | 5 ms | 5740 KB | Output is correct |
10 | Correct | 5 ms | 5740 KB | Output is correct |
11 | Correct | 6 ms | 5740 KB | Output is correct |
12 | Correct | 4 ms | 5740 KB | Output is correct |
13 | Correct | 4 ms | 5740 KB | Output is correct |
14 | Correct | 4 ms | 5740 KB | Output is correct |
15 | Correct | 4 ms | 5740 KB | Output is correct |
16 | Correct | 4 ms | 5740 KB | Output is correct |
17 | Correct | 4 ms | 5740 KB | Output is correct |
18 | Correct | 5 ms | 5792 KB | Output is correct |
19 | Correct | 4 ms | 5740 KB | Output is correct |
20 | Correct | 5 ms | 5740 KB | Output is correct |
21 | Correct | 4 ms | 5740 KB | Output is correct |
22 | Correct | 4 ms | 5740 KB | Output is correct |
23 | Correct | 4 ms | 5760 KB | Output is correct |
24 | Correct | 5 ms | 5868 KB | Output is correct |
25 | Correct | 4 ms | 5740 KB | Output is correct |
26 | Correct | 5 ms | 5868 KB | Output is correct |
27 | Correct | 5 ms | 5868 KB | Output is correct |
28 | Correct | 4 ms | 5868 KB | Output is correct |
29 | Correct | 4 ms | 5868 KB | Output is correct |
30 | Correct | 5 ms | 5868 KB | Output is correct |
31 | Correct | 5 ms | 5868 KB | Output is correct |
32 | Correct | 5 ms | 5868 KB | Output is correct |
33 | Correct | 4 ms | 5868 KB | Output is correct |
34 | Correct | 5 ms | 5868 KB | Output is correct |
35 | Correct | 4 ms | 5888 KB | Output is correct |
36 | Correct | 4 ms | 5868 KB | Output is correct |
37 | Correct | 5 ms | 5868 KB | Output is correct |
38 | Correct | 5 ms | 5868 KB | Output is correct |
39 | Correct | 6 ms | 5740 KB | Output is correct |
40 | Correct | 5 ms | 5868 KB | Output is correct |
41 | Correct | 4 ms | 5740 KB | Output is correct |
42 | Correct | 5 ms | 5740 KB | Output is correct |
43 | Correct | 4 ms | 5740 KB | Output is correct |
44 | Correct | 5 ms | 5740 KB | Output is correct |
45 | Correct | 5 ms | 5868 KB | Output is correct |
46 | Correct | 5 ms | 5740 KB | Output is correct |
47 | Correct | 4 ms | 5868 KB | Output is correct |
48 | Correct | 5 ms | 5740 KB | Output is correct |
49 | Correct | 5 ms | 5868 KB | Output is correct |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 5 ms | 5740 KB | Output is correct |
2 | Correct | 4 ms | 5740 KB | Output is correct |
3 | Correct | 4 ms | 5740 KB | Output is correct |
4 | Correct | 4 ms | 5740 KB | Output is correct |
5 | Correct | 4 ms | 5740 KB | Output is correct |
6 | Correct | 4 ms | 5740 KB | Output is correct |
7 | Correct | 4 ms | 5740 KB | Output is correct |
8 | Correct | 5 ms | 5740 KB | Output is correct |
9 | Correct | 5 ms | 5740 KB | Output is correct |
10 | Correct | 5 ms | 5740 KB | Output is correct |
11 | Correct | 6 ms | 5740 KB | Output is correct |
12 | Correct | 4 ms | 5740 KB | Output is correct |
13 | Correct | 4 ms | 5740 KB | Output is correct |
14 | Correct | 4 ms | 5740 KB | Output is correct |
15 | Correct | 4 ms | 5740 KB | Output is correct |
16 | Correct | 4 ms | 5740 KB | Output is correct |
17 | Correct | 4 ms | 5740 KB | Output is correct |
18 | Correct | 5 ms | 5792 KB | Output is correct |
19 | Correct | 4 ms | 5740 KB | Output is correct |
20 | Correct | 5 ms | 5740 KB | Output is correct |
21 | Correct | 4 ms | 5740 KB | Output is correct |
22 | Correct | 4 ms | 5740 KB | Output is correct |
23 | Correct | 4 ms | 5760 KB | Output is correct |
24 | Correct | 5 ms | 5868 KB | Output is correct |
25 | Correct | 4 ms | 5740 KB | Output is correct |
26 | Correct | 5 ms | 5868 KB | Output is correct |
27 | Correct | 5 ms | 5868 KB | Output is correct |
28 | Correct | 4 ms | 5868 KB | Output is correct |
29 | Correct | 4 ms | 5868 KB | Output is correct |
30 | Correct | 5 ms | 5868 KB | Output is correct |
31 | Correct | 5 ms | 5868 KB | Output is correct |
32 | Correct | 5 ms | 5868 KB | Output is correct |
33 | Correct | 4 ms | 5868 KB | Output is correct |
34 | Correct | 5 ms | 5868 KB | Output is correct |
35 | Correct | 4 ms | 5888 KB | Output is correct |
36 | Correct | 4 ms | 5868 KB | Output is correct |
37 | Correct | 5 ms | 5868 KB | Output is correct |
38 | Correct | 5 ms | 5868 KB | Output is correct |
39 | Correct | 6 ms | 5740 KB | Output is correct |
40 | Correct | 5 ms | 5868 KB | Output is correct |
41 | Correct | 4 ms | 5740 KB | Output is correct |
42 | Correct | 5 ms | 5740 KB | Output is correct |
43 | Correct | 4 ms | 5740 KB | Output is correct |
44 | Correct | 5 ms | 5740 KB | Output is correct |
45 | Correct | 5 ms | 5868 KB | Output is correct |
46 | Correct | 5 ms | 5740 KB | Output is correct |
47 | Correct | 4 ms | 5868 KB | Output is correct |
48 | Correct | 5 ms | 5740 KB | Output is correct |
49 | Correct | 5 ms | 5868 KB | Output is correct |
50 | Correct | 6 ms | 6124 KB | Output is correct |
51 | Correct | 6 ms | 5996 KB | Output is correct |
52 | Correct | 6 ms | 5996 KB | Output is correct |
53 | Correct | 7 ms | 5996 KB | Output is correct |
54 | Correct | 5 ms | 5868 KB | Output is correct |
55 | Correct | 6 ms | 6124 KB | Output is correct |
56 | Correct | 6 ms | 6124 KB | Output is correct |
57 | Correct | 7 ms | 6124 KB | Output is correct |
58 | Correct | 4 ms | 5740 KB | Output is correct |
59 | Correct | 4 ms | 5740 KB | Output is correct |
60 | Correct | 5 ms | 5868 KB | Output is correct |
61 | Correct | 5 ms | 5996 KB | Output is correct |
62 | Correct | 5 ms | 5868 KB | Output is correct |
63 | Correct | 5 ms | 5868 KB | Output is correct |
64 | Correct | 4 ms | 5740 KB | Output is correct |
65 | Correct | 5 ms | 5996 KB | Output is correct |
66 | Correct | 4 ms | 5740 KB | Output is correct |
67 | Correct | 5 ms | 5740 KB | Output is correct |
68 | Correct | 5 ms | 5740 KB | Output is correct |
69 | Correct | 5 ms | 5868 KB | Output is correct |
70 | Correct | 5 ms | 5868 KB | Output is correct |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 5 ms | 5740 KB | Output is correct |
2 | Correct | 4 ms | 5740 KB | Output is correct |
3 | Correct | 4 ms | 5740 KB | Output is correct |
4 | Correct | 4 ms | 5740 KB | Output is correct |
5 | Correct | 4 ms | 5740 KB | Output is correct |
6 | Correct | 4 ms | 5740 KB | Output is correct |
7 | Correct | 4 ms | 5740 KB | Output is correct |
8 | Correct | 5 ms | 5740 KB | Output is correct |
9 | Correct | 5 ms | 5740 KB | Output is correct |
10 | Correct | 5 ms | 5740 KB | Output is correct |
11 | Correct | 6 ms | 5740 KB | Output is correct |
12 | Correct | 4 ms | 5740 KB | Output is correct |
13 | Correct | 4 ms | 5740 KB | Output is correct |
14 | Correct | 4 ms | 5740 KB | Output is correct |
15 | Correct | 4 ms | 5740 KB | Output is correct |
16 | Correct | 4 ms | 5740 KB | Output is correct |
17 | Correct | 4 ms | 5740 KB | Output is correct |
18 | Correct | 5 ms | 5792 KB | Output is correct |
19 | Correct | 4 ms | 5740 KB | Output is correct |
20 | Correct | 5 ms | 5740 KB | Output is correct |
21 | Correct | 4 ms | 5740 KB | Output is correct |
22 | Correct | 4 ms | 5740 KB | Output is correct |
23 | Correct | 4 ms | 5760 KB | Output is correct |
24 | Correct | 5 ms | 5868 KB | Output is correct |
25 | Correct | 4 ms | 5740 KB | Output is correct |
26 | Correct | 5 ms | 5868 KB | Output is correct |
27 | Correct | 5 ms | 5868 KB | Output is correct |
28 | Correct | 4 ms | 5868 KB | Output is correct |
29 | Correct | 4 ms | 5868 KB | Output is correct |
30 | Correct | 5 ms | 5868 KB | Output is correct |
31 | Correct | 5 ms | 5868 KB | Output is correct |
32 | Correct | 5 ms | 5868 KB | Output is correct |
33 | Correct | 4 ms | 5868 KB | Output is correct |
34 | Correct | 5 ms | 5868 KB | Output is correct |
35 | Correct | 4 ms | 5888 KB | Output is correct |
36 | Correct | 4 ms | 5868 KB | Output is correct |
37 | Correct | 5 ms | 5868 KB | Output is correct |
38 | Correct | 5 ms | 5868 KB | Output is correct |
39 | Correct | 6 ms | 5740 KB | Output is correct |
40 | Correct | 5 ms | 5868 KB | Output is correct |
41 | Correct | 4 ms | 5740 KB | Output is correct |
42 | Correct | 5 ms | 5740 KB | Output is correct |
43 | Correct | 4 ms | 5740 KB | Output is correct |
44 | Correct | 5 ms | 5740 KB | Output is correct |
45 | Correct | 5 ms | 5868 KB | Output is correct |
46 | Correct | 5 ms | 5740 KB | Output is correct |
47 | Correct | 4 ms | 5868 KB | Output is correct |
48 | Correct | 5 ms | 5740 KB | Output is correct |
49 | Correct | 5 ms | 5868 KB | Output is correct |
50 | Correct | 6 ms | 6124 KB | Output is correct |
51 | Correct | 6 ms | 5996 KB | Output is correct |
52 | Correct | 6 ms | 5996 KB | Output is correct |
53 | Correct | 7 ms | 5996 KB | Output is correct |
54 | Correct | 5 ms | 5868 KB | Output is correct |
55 | Correct | 6 ms | 6124 KB | Output is correct |
56 | Correct | 6 ms | 6124 KB | Output is correct |
57 | Correct | 7 ms | 6124 KB | Output is correct |
58 | Correct | 4 ms | 5740 KB | Output is correct |
59 | Correct | 4 ms | 5740 KB | Output is correct |
60 | Correct | 5 ms | 5868 KB | Output is correct |
61 | Correct | 5 ms | 5996 KB | Output is correct |
62 | Correct | 5 ms | 5868 KB | Output is correct |
63 | Correct | 5 ms | 5868 KB | Output is correct |
64 | Correct | 4 ms | 5740 KB | Output is correct |
65 | Correct | 5 ms | 5996 KB | Output is correct |
66 | Correct | 4 ms | 5740 KB | Output is correct |
67 | Correct | 5 ms | 5740 KB | Output is correct |
68 | Correct | 5 ms | 5740 KB | Output is correct |
69 | Correct | 5 ms | 5868 KB | Output is correct |
70 | Correct | 5 ms | 5868 KB | Output is correct |
71 | Correct | 263 ms | 22508 KB | Output is correct |
72 | Correct | 197 ms | 18616 KB | Output is correct |
73 | Correct | 246 ms | 20716 KB | Output is correct |
74 | Correct | 117 ms | 15724 KB | Output is correct |
75 | Correct | 166 ms | 16492 KB | Output is correct |
76 | Correct | 482 ms | 28472 KB | Output is correct |
77 | Correct | 377 ms | 25964 KB | Output is correct |
78 | Correct | 372 ms | 24556 KB | Output is correct |
79 | Correct | 351 ms | 24172 KB | Output is correct |
80 | Correct | 4 ms | 5740 KB | Output is correct |
81 | Correct | 5 ms | 5888 KB | Output is correct |
82 | Correct | 6 ms | 6124 KB | Output is correct |
83 | Correct | 29 ms | 8940 KB | Output is correct |
84 | Correct | 37 ms | 9580 KB | Output is correct |
85 | Correct | 11 ms | 6892 KB | Output is correct |
86 | Correct | 5 ms | 5868 KB | Output is correct |
87 | Correct | 42 ms | 10272 KB | Output is correct |
88 | Correct | 5 ms | 5740 KB | Output is correct |
89 | Correct | 4 ms | 5740 KB | Output is correct |
90 | Correct | 4 ms | 5868 KB | Output is correct |
91 | Correct | 14 ms | 7532 KB | Output is correct |
92 | Correct | 59 ms | 11628 KB | Output is correct |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 5 ms | 5740 KB | Output is correct |
2 | Correct | 4 ms | 5740 KB | Output is correct |
3 | Correct | 4 ms | 5740 KB | Output is correct |
4 | Correct | 4 ms | 5740 KB | Output is correct |
5 | Correct | 4 ms | 5740 KB | Output is correct |
6 | Correct | 4 ms | 5740 KB | Output is correct |
7 | Correct | 4 ms | 5740 KB | Output is correct |
8 | Correct | 5 ms | 5740 KB | Output is correct |
9 | Correct | 5 ms | 5740 KB | Output is correct |
10 | Correct | 5 ms | 5740 KB | Output is correct |
11 | Correct | 6 ms | 5740 KB | Output is correct |
12 | Correct | 4 ms | 5740 KB | Output is correct |
13 | Correct | 4 ms | 5740 KB | Output is correct |
14 | Correct | 4 ms | 5740 KB | Output is correct |
15 | Correct | 4 ms | 5740 KB | Output is correct |
16 | Correct | 4 ms | 5740 KB | Output is correct |
17 | Correct | 4 ms | 5740 KB | Output is correct |
18 | Correct | 5 ms | 5792 KB | Output is correct |
19 | Correct | 4 ms | 5740 KB | Output is correct |
20 | Correct | 5 ms | 5740 KB | Output is correct |
21 | Correct | 4 ms | 5740 KB | Output is correct |
22 | Correct | 4 ms | 5740 KB | Output is correct |
23 | Correct | 4 ms | 5760 KB | Output is correct |
24 | Correct | 5 ms | 5868 KB | Output is correct |
25 | Correct | 4 ms | 5740 KB | Output is correct |
26 | Correct | 5 ms | 5868 KB | Output is correct |
27 | Correct | 5 ms | 5868 KB | Output is correct |
28 | Correct | 4 ms | 5868 KB | Output is correct |
29 | Correct | 4 ms | 5868 KB | Output is correct |
30 | Correct | 5 ms | 5868 KB | Output is correct |
31 | Correct | 5 ms | 5868 KB | Output is correct |
32 | Correct | 5 ms | 5868 KB | Output is correct |
33 | Correct | 4 ms | 5868 KB | Output is correct |
34 | Correct | 5 ms | 5868 KB | Output is correct |
35 | Correct | 4 ms | 5888 KB | Output is correct |
36 | Correct | 4 ms | 5868 KB | Output is correct |
37 | Correct | 5 ms | 5868 KB | Output is correct |
38 | Correct | 5 ms | 5868 KB | Output is correct |
39 | Correct | 6 ms | 5740 KB | Output is correct |
40 | Correct | 5 ms | 5868 KB | Output is correct |
41 | Correct | 4 ms | 5740 KB | Output is correct |
42 | Correct | 5 ms | 5740 KB | Output is correct |
43 | Correct | 4 ms | 5740 KB | Output is correct |
44 | Correct | 5 ms | 5740 KB | Output is correct |
45 | Correct | 5 ms | 5868 KB | Output is correct |
46 | Correct | 5 ms | 5740 KB | Output is correct |
47 | Correct | 4 ms | 5868 KB | Output is correct |
48 | Correct | 5 ms | 5740 KB | Output is correct |
49 | Correct | 5 ms | 5868 KB | Output is correct |
50 | Correct | 6 ms | 6124 KB | Output is correct |
51 | Correct | 6 ms | 5996 KB | Output is correct |
52 | Correct | 6 ms | 5996 KB | Output is correct |
53 | Correct | 7 ms | 5996 KB | Output is correct |
54 | Correct | 5 ms | 5868 KB | Output is correct |
55 | Correct | 6 ms | 6124 KB | Output is correct |
56 | Correct | 6 ms | 6124 KB | Output is correct |
57 | Correct | 7 ms | 6124 KB | Output is correct |
58 | Correct | 4 ms | 5740 KB | Output is correct |
59 | Correct | 4 ms | 5740 KB | Output is correct |
60 | Correct | 5 ms | 5868 KB | Output is correct |
61 | Correct | 5 ms | 5996 KB | Output is correct |
62 | Correct | 5 ms | 5868 KB | Output is correct |
63 | Correct | 5 ms | 5868 KB | Output is correct |
64 | Correct | 4 ms | 5740 KB | Output is correct |
65 | Correct | 5 ms | 5996 KB | Output is correct |
66 | Correct | 4 ms | 5740 KB | Output is correct |
67 | Correct | 5 ms | 5740 KB | Output is correct |
68 | Correct | 5 ms | 5740 KB | Output is correct |
69 | Correct | 5 ms | 5868 KB | Output is correct |
70 | Correct | 5 ms | 5868 KB | Output is correct |
71 | Correct | 263 ms | 22508 KB | Output is correct |
72 | Correct | 197 ms | 18616 KB | Output is correct |
73 | Correct | 246 ms | 20716 KB | Output is correct |
74 | Correct | 117 ms | 15724 KB | Output is correct |
75 | Correct | 166 ms | 16492 KB | Output is correct |
76 | Correct | 482 ms | 28472 KB | Output is correct |
77 | Correct | 377 ms | 25964 KB | Output is correct |
78 | Correct | 372 ms | 24556 KB | Output is correct |
79 | Correct | 351 ms | 24172 KB | Output is correct |
80 | Correct | 4 ms | 5740 KB | Output is correct |
81 | Correct | 5 ms | 5888 KB | Output is correct |
82 | Correct | 6 ms | 6124 KB | Output is correct |
83 | Correct | 29 ms | 8940 KB | Output is correct |
84 | Correct | 37 ms | 9580 KB | Output is correct |
85 | Correct | 11 ms | 6892 KB | Output is correct |
86 | Correct | 5 ms | 5868 KB | Output is correct |
87 | Correct | 42 ms | 10272 KB | Output is correct |
88 | Correct | 5 ms | 5740 KB | Output is correct |
89 | Correct | 4 ms | 5740 KB | Output is correct |
90 | Correct | 4 ms | 5868 KB | Output is correct |
91 | Correct | 14 ms | 7532 KB | Output is correct |
92 | Correct | 59 ms | 11628 KB | Output is correct |
93 | Correct | 1956 ms | 77248 KB | Output is correct |
94 | Correct | 1128 ms | 53776 KB | Output is correct |
95 | Correct | 1256 ms | 56096 KB | Output is correct |
96 | Correct | 1110 ms | 50600 KB | Output is correct |
97 | Correct | 982 ms | 46640 KB | Output is correct |
98 | Correct | 2234 ms | 84512 KB | Output is correct |
99 | Correct | 2297 ms | 85764 KB | Output is correct |
100 | Correct | 2147 ms | 82532 KB | Output is correct |
101 | Correct | 1905 ms | 76744 KB | Output is correct |
102 | Correct | 1733 ms | 69412 KB | Output is correct |
103 | Correct | 1422 ms | 63088 KB | Output is correct |
104 | Correct | 4 ms | 5740 KB | Output is correct |
105 | Correct | 5 ms | 5740 KB | Output is correct |
106 | Correct | 8 ms | 6412 KB | Output is correct |
107 | Correct | 135 ms | 14468 KB | Output is correct |
108 | Correct | 346 ms | 24392 KB | Output is correct |
109 | Correct | 23 ms | 8556 KB | Output is correct |
110 | Correct | 5 ms | 5740 KB | Output is correct |
111 | Correct | 126 ms | 16620 KB | Output is correct |
112 | Correct | 4 ms | 5740 KB | Output is correct |
113 | Correct | 5 ms | 5740 KB | Output is correct |
114 | Correct | 8 ms | 6380 KB | Output is correct |
115 | Correct | 4 ms | 5740 KB | Output is correct |
116 | Correct | 12 ms | 7148 KB | Output is correct |
117 | Correct | 479 ms | 28280 KB | Output is correct |