from math import sqrt, floor
n = int(input())
divs = []
for i in range(2, floor(sqrt(n))+1):
if n%i==0:
divs.append(i)
if i != n//i:
divs.append(n//i)
divs.sort()
divs.append(n)
sus = [set() for i in range(n+1)]
sus[1].add(0)
for i in range(1,n+1):
for j in divs:
if n%(i*j): continue
for k in sus[i]:
sus[i*j].add(k+j-1)
print(len(sus[-1]))
print(" ".join(map(str, sorted(list(sus[-1])))))
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
30 ms |
18276 KB |
Output is correct |
2 |
Correct |
41 ms |
18252 KB |
Output is correct |
3 |
Correct |
31 ms |
18240 KB |
Output is correct |
4 |
Correct |
30 ms |
18228 KB |
Output is correct |
5 |
Correct |
36 ms |
18192 KB |
Output is correct |
6 |
Correct |
39 ms |
18204 KB |
Output is correct |
7 |
Correct |
33 ms |
18192 KB |
Output is correct |
8 |
Correct |
33 ms |
18328 KB |
Output is correct |
9 |
Correct |
35 ms |
18212 KB |
Output is correct |
10 |
Correct |
31 ms |
18216 KB |
Output is correct |
11 |
Correct |
32 ms |
18256 KB |
Output is correct |
12 |
Correct |
38 ms |
18160 KB |
Output is correct |
13 |
Correct |
33 ms |
18204 KB |
Output is correct |
14 |
Correct |
31 ms |
18204 KB |
Output is correct |
15 |
Correct |
39 ms |
18184 KB |
Output is correct |
16 |
Correct |
32 ms |
18144 KB |
Output is correct |
17 |
Correct |
32 ms |
18216 KB |
Output is correct |
18 |
Correct |
29 ms |
18200 KB |
Output is correct |
19 |
Correct |
31 ms |
18204 KB |
Output is correct |
20 |
Correct |
30 ms |
18204 KB |
Output is correct |
21 |
Correct |
35 ms |
18144 KB |
Output is correct |
22 |
Correct |
29 ms |
18136 KB |
Output is correct |
23 |
Correct |
36 ms |
18196 KB |
Output is correct |
24 |
Correct |
30 ms |
18168 KB |
Output is correct |
25 |
Correct |
30 ms |
18296 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
30 ms |
18276 KB |
Output is correct |
2 |
Correct |
41 ms |
18252 KB |
Output is correct |
3 |
Correct |
31 ms |
18240 KB |
Output is correct |
4 |
Correct |
30 ms |
18228 KB |
Output is correct |
5 |
Correct |
36 ms |
18192 KB |
Output is correct |
6 |
Correct |
39 ms |
18204 KB |
Output is correct |
7 |
Correct |
33 ms |
18192 KB |
Output is correct |
8 |
Correct |
33 ms |
18328 KB |
Output is correct |
9 |
Correct |
35 ms |
18212 KB |
Output is correct |
10 |
Correct |
31 ms |
18216 KB |
Output is correct |
11 |
Correct |
32 ms |
18256 KB |
Output is correct |
12 |
Correct |
38 ms |
18160 KB |
Output is correct |
13 |
Correct |
33 ms |
18204 KB |
Output is correct |
14 |
Correct |
31 ms |
18204 KB |
Output is correct |
15 |
Correct |
39 ms |
18184 KB |
Output is correct |
16 |
Correct |
32 ms |
18144 KB |
Output is correct |
17 |
Correct |
32 ms |
18216 KB |
Output is correct |
18 |
Correct |
29 ms |
18200 KB |
Output is correct |
19 |
Correct |
31 ms |
18204 KB |
Output is correct |
20 |
Correct |
30 ms |
18204 KB |
Output is correct |
21 |
Correct |
35 ms |
18144 KB |
Output is correct |
22 |
Correct |
29 ms |
18136 KB |
Output is correct |
23 |
Correct |
36 ms |
18196 KB |
Output is correct |
24 |
Correct |
30 ms |
18168 KB |
Output is correct |
25 |
Correct |
30 ms |
18296 KB |
Output is correct |
26 |
Correct |
42 ms |
19808 KB |
Output is correct |
27 |
Correct |
43 ms |
19548 KB |
Output is correct |
28 |
Correct |
37 ms |
19348 KB |
Output is correct |
29 |
Correct |
36 ms |
19284 KB |
Output is correct |
30 |
Correct |
43 ms |
18964 KB |
Output is correct |
31 |
Correct |
52 ms |
19628 KB |
Output is correct |
32 |
Correct |
39 ms |
19632 KB |
Output is correct |
33 |
Correct |
42 ms |
19900 KB |
Output is correct |
34 |
Correct |
34 ms |
19412 KB |
Output is correct |
35 |
Correct |
38 ms |
19476 KB |
Output is correct |
36 |
Correct |
43 ms |
19404 KB |
Output is correct |
37 |
Correct |
38 ms |
19676 KB |
Output is correct |
38 |
Correct |
39 ms |
19488 KB |
Output is correct |
39 |
Correct |
37 ms |
19548 KB |
Output is correct |
40 |
Correct |
46 ms |
19744 KB |
Output is correct |
41 |
Correct |
35 ms |
19452 KB |
Output is correct |
42 |
Correct |
34 ms |
19372 KB |
Output is correct |
43 |
Correct |
42 ms |
19492 KB |
Output is correct |
44 |
Correct |
37 ms |
19472 KB |
Output is correct |
45 |
Correct |
38 ms |
19420 KB |
Output is correct |
46 |
Correct |
35 ms |
19460 KB |
Output is correct |
47 |
Correct |
39 ms |
19740 KB |
Output is correct |
48 |
Correct |
37 ms |
19492 KB |
Output is correct |
49 |
Correct |
37 ms |
19504 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
30 ms |
18276 KB |
Output is correct |
2 |
Correct |
41 ms |
18252 KB |
Output is correct |
3 |
Correct |
31 ms |
18240 KB |
Output is correct |
4 |
Correct |
30 ms |
18228 KB |
Output is correct |
5 |
Correct |
36 ms |
18192 KB |
Output is correct |
6 |
Correct |
39 ms |
18204 KB |
Output is correct |
7 |
Correct |
33 ms |
18192 KB |
Output is correct |
8 |
Correct |
33 ms |
18328 KB |
Output is correct |
9 |
Correct |
35 ms |
18212 KB |
Output is correct |
10 |
Correct |
31 ms |
18216 KB |
Output is correct |
11 |
Correct |
32 ms |
18256 KB |
Output is correct |
12 |
Correct |
38 ms |
18160 KB |
Output is correct |
13 |
Correct |
33 ms |
18204 KB |
Output is correct |
14 |
Correct |
31 ms |
18204 KB |
Output is correct |
15 |
Correct |
39 ms |
18184 KB |
Output is correct |
16 |
Correct |
32 ms |
18144 KB |
Output is correct |
17 |
Correct |
32 ms |
18216 KB |
Output is correct |
18 |
Correct |
29 ms |
18200 KB |
Output is correct |
19 |
Correct |
31 ms |
18204 KB |
Output is correct |
20 |
Correct |
30 ms |
18204 KB |
Output is correct |
21 |
Correct |
35 ms |
18144 KB |
Output is correct |
22 |
Correct |
29 ms |
18136 KB |
Output is correct |
23 |
Correct |
36 ms |
18196 KB |
Output is correct |
24 |
Correct |
30 ms |
18168 KB |
Output is correct |
25 |
Correct |
30 ms |
18296 KB |
Output is correct |
26 |
Correct |
42 ms |
19808 KB |
Output is correct |
27 |
Correct |
43 ms |
19548 KB |
Output is correct |
28 |
Correct |
37 ms |
19348 KB |
Output is correct |
29 |
Correct |
36 ms |
19284 KB |
Output is correct |
30 |
Correct |
43 ms |
18964 KB |
Output is correct |
31 |
Correct |
52 ms |
19628 KB |
Output is correct |
32 |
Correct |
39 ms |
19632 KB |
Output is correct |
33 |
Correct |
42 ms |
19900 KB |
Output is correct |
34 |
Correct |
34 ms |
19412 KB |
Output is correct |
35 |
Correct |
38 ms |
19476 KB |
Output is correct |
36 |
Correct |
43 ms |
19404 KB |
Output is correct |
37 |
Correct |
38 ms |
19676 KB |
Output is correct |
38 |
Correct |
39 ms |
19488 KB |
Output is correct |
39 |
Correct |
37 ms |
19548 KB |
Output is correct |
40 |
Correct |
46 ms |
19744 KB |
Output is correct |
41 |
Correct |
35 ms |
19452 KB |
Output is correct |
42 |
Correct |
34 ms |
19372 KB |
Output is correct |
43 |
Correct |
42 ms |
19492 KB |
Output is correct |
44 |
Correct |
37 ms |
19472 KB |
Output is correct |
45 |
Correct |
38 ms |
19420 KB |
Output is correct |
46 |
Correct |
35 ms |
19460 KB |
Output is correct |
47 |
Correct |
39 ms |
19740 KB |
Output is correct |
48 |
Correct |
37 ms |
19492 KB |
Output is correct |
49 |
Correct |
37 ms |
19504 KB |
Output is correct |
50 |
Correct |
90 ms |
23100 KB |
Output is correct |
51 |
Correct |
76 ms |
22340 KB |
Output is correct |
52 |
Correct |
65 ms |
21680 KB |
Output is correct |
53 |
Correct |
64 ms |
21656 KB |
Output is correct |
54 |
Correct |
57 ms |
20272 KB |
Output is correct |
55 |
Correct |
106 ms |
23476 KB |
Output is correct |
56 |
Correct |
80 ms |
22984 KB |
Output is correct |
57 |
Correct |
85 ms |
22832 KB |
Output is correct |
58 |
Correct |
39 ms |
23164 KB |
Output is correct |
59 |
Correct |
41 ms |
23004 KB |
Output is correct |
60 |
Correct |
62 ms |
22400 KB |
Output is correct |
61 |
Correct |
65 ms |
23348 KB |
Output is correct |
62 |
Correct |
47 ms |
20352 KB |
Output is correct |
63 |
Correct |
56 ms |
23364 KB |
Output is correct |
64 |
Correct |
57 ms |
23080 KB |
Output is correct |
65 |
Correct |
73 ms |
23112 KB |
Output is correct |
66 |
Correct |
40 ms |
23060 KB |
Output is correct |
67 |
Correct |
43 ms |
23380 KB |
Output is correct |
68 |
Correct |
48 ms |
23068 KB |
Output is correct |
69 |
Correct |
68 ms |
23316 KB |
Output is correct |
70 |
Correct |
81 ms |
23192 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
30 ms |
18276 KB |
Output is correct |
2 |
Correct |
41 ms |
18252 KB |
Output is correct |
3 |
Correct |
31 ms |
18240 KB |
Output is correct |
4 |
Correct |
30 ms |
18228 KB |
Output is correct |
5 |
Correct |
36 ms |
18192 KB |
Output is correct |
6 |
Correct |
39 ms |
18204 KB |
Output is correct |
7 |
Correct |
33 ms |
18192 KB |
Output is correct |
8 |
Correct |
33 ms |
18328 KB |
Output is correct |
9 |
Correct |
35 ms |
18212 KB |
Output is correct |
10 |
Correct |
31 ms |
18216 KB |
Output is correct |
11 |
Correct |
32 ms |
18256 KB |
Output is correct |
12 |
Correct |
38 ms |
18160 KB |
Output is correct |
13 |
Correct |
33 ms |
18204 KB |
Output is correct |
14 |
Correct |
31 ms |
18204 KB |
Output is correct |
15 |
Correct |
39 ms |
18184 KB |
Output is correct |
16 |
Correct |
32 ms |
18144 KB |
Output is correct |
17 |
Correct |
32 ms |
18216 KB |
Output is correct |
18 |
Correct |
29 ms |
18200 KB |
Output is correct |
19 |
Correct |
31 ms |
18204 KB |
Output is correct |
20 |
Correct |
30 ms |
18204 KB |
Output is correct |
21 |
Correct |
35 ms |
18144 KB |
Output is correct |
22 |
Correct |
29 ms |
18136 KB |
Output is correct |
23 |
Correct |
36 ms |
18196 KB |
Output is correct |
24 |
Correct |
30 ms |
18168 KB |
Output is correct |
25 |
Correct |
30 ms |
18296 KB |
Output is correct |
26 |
Correct |
42 ms |
19808 KB |
Output is correct |
27 |
Correct |
43 ms |
19548 KB |
Output is correct |
28 |
Correct |
37 ms |
19348 KB |
Output is correct |
29 |
Correct |
36 ms |
19284 KB |
Output is correct |
30 |
Correct |
43 ms |
18964 KB |
Output is correct |
31 |
Correct |
52 ms |
19628 KB |
Output is correct |
32 |
Correct |
39 ms |
19632 KB |
Output is correct |
33 |
Correct |
42 ms |
19900 KB |
Output is correct |
34 |
Correct |
34 ms |
19412 KB |
Output is correct |
35 |
Correct |
38 ms |
19476 KB |
Output is correct |
36 |
Correct |
43 ms |
19404 KB |
Output is correct |
37 |
Correct |
38 ms |
19676 KB |
Output is correct |
38 |
Correct |
39 ms |
19488 KB |
Output is correct |
39 |
Correct |
37 ms |
19548 KB |
Output is correct |
40 |
Correct |
46 ms |
19744 KB |
Output is correct |
41 |
Correct |
35 ms |
19452 KB |
Output is correct |
42 |
Correct |
34 ms |
19372 KB |
Output is correct |
43 |
Correct |
42 ms |
19492 KB |
Output is correct |
44 |
Correct |
37 ms |
19472 KB |
Output is correct |
45 |
Correct |
38 ms |
19420 KB |
Output is correct |
46 |
Correct |
35 ms |
19460 KB |
Output is correct |
47 |
Correct |
39 ms |
19740 KB |
Output is correct |
48 |
Correct |
37 ms |
19492 KB |
Output is correct |
49 |
Correct |
37 ms |
19504 KB |
Output is correct |
50 |
Correct |
90 ms |
23100 KB |
Output is correct |
51 |
Correct |
76 ms |
22340 KB |
Output is correct |
52 |
Correct |
65 ms |
21680 KB |
Output is correct |
53 |
Correct |
64 ms |
21656 KB |
Output is correct |
54 |
Correct |
57 ms |
20272 KB |
Output is correct |
55 |
Correct |
106 ms |
23476 KB |
Output is correct |
56 |
Correct |
80 ms |
22984 KB |
Output is correct |
57 |
Correct |
85 ms |
22832 KB |
Output is correct |
58 |
Correct |
39 ms |
23164 KB |
Output is correct |
59 |
Correct |
41 ms |
23004 KB |
Output is correct |
60 |
Correct |
62 ms |
22400 KB |
Output is correct |
61 |
Correct |
65 ms |
23348 KB |
Output is correct |
62 |
Correct |
47 ms |
20352 KB |
Output is correct |
63 |
Correct |
56 ms |
23364 KB |
Output is correct |
64 |
Correct |
57 ms |
23080 KB |
Output is correct |
65 |
Correct |
73 ms |
23112 KB |
Output is correct |
66 |
Correct |
40 ms |
23060 KB |
Output is correct |
67 |
Correct |
43 ms |
23380 KB |
Output is correct |
68 |
Correct |
48 ms |
23068 KB |
Output is correct |
69 |
Correct |
68 ms |
23316 KB |
Output is correct |
70 |
Correct |
81 ms |
23192 KB |
Output is correct |
71 |
Runtime error |
119 ms |
262144 KB |
Execution killed with signal 9 |
72 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
30 ms |
18276 KB |
Output is correct |
2 |
Correct |
41 ms |
18252 KB |
Output is correct |
3 |
Correct |
31 ms |
18240 KB |
Output is correct |
4 |
Correct |
30 ms |
18228 KB |
Output is correct |
5 |
Correct |
36 ms |
18192 KB |
Output is correct |
6 |
Correct |
39 ms |
18204 KB |
Output is correct |
7 |
Correct |
33 ms |
18192 KB |
Output is correct |
8 |
Correct |
33 ms |
18328 KB |
Output is correct |
9 |
Correct |
35 ms |
18212 KB |
Output is correct |
10 |
Correct |
31 ms |
18216 KB |
Output is correct |
11 |
Correct |
32 ms |
18256 KB |
Output is correct |
12 |
Correct |
38 ms |
18160 KB |
Output is correct |
13 |
Correct |
33 ms |
18204 KB |
Output is correct |
14 |
Correct |
31 ms |
18204 KB |
Output is correct |
15 |
Correct |
39 ms |
18184 KB |
Output is correct |
16 |
Correct |
32 ms |
18144 KB |
Output is correct |
17 |
Correct |
32 ms |
18216 KB |
Output is correct |
18 |
Correct |
29 ms |
18200 KB |
Output is correct |
19 |
Correct |
31 ms |
18204 KB |
Output is correct |
20 |
Correct |
30 ms |
18204 KB |
Output is correct |
21 |
Correct |
35 ms |
18144 KB |
Output is correct |
22 |
Correct |
29 ms |
18136 KB |
Output is correct |
23 |
Correct |
36 ms |
18196 KB |
Output is correct |
24 |
Correct |
30 ms |
18168 KB |
Output is correct |
25 |
Correct |
30 ms |
18296 KB |
Output is correct |
26 |
Correct |
42 ms |
19808 KB |
Output is correct |
27 |
Correct |
43 ms |
19548 KB |
Output is correct |
28 |
Correct |
37 ms |
19348 KB |
Output is correct |
29 |
Correct |
36 ms |
19284 KB |
Output is correct |
30 |
Correct |
43 ms |
18964 KB |
Output is correct |
31 |
Correct |
52 ms |
19628 KB |
Output is correct |
32 |
Correct |
39 ms |
19632 KB |
Output is correct |
33 |
Correct |
42 ms |
19900 KB |
Output is correct |
34 |
Correct |
34 ms |
19412 KB |
Output is correct |
35 |
Correct |
38 ms |
19476 KB |
Output is correct |
36 |
Correct |
43 ms |
19404 KB |
Output is correct |
37 |
Correct |
38 ms |
19676 KB |
Output is correct |
38 |
Correct |
39 ms |
19488 KB |
Output is correct |
39 |
Correct |
37 ms |
19548 KB |
Output is correct |
40 |
Correct |
46 ms |
19744 KB |
Output is correct |
41 |
Correct |
35 ms |
19452 KB |
Output is correct |
42 |
Correct |
34 ms |
19372 KB |
Output is correct |
43 |
Correct |
42 ms |
19492 KB |
Output is correct |
44 |
Correct |
37 ms |
19472 KB |
Output is correct |
45 |
Correct |
38 ms |
19420 KB |
Output is correct |
46 |
Correct |
35 ms |
19460 KB |
Output is correct |
47 |
Correct |
39 ms |
19740 KB |
Output is correct |
48 |
Correct |
37 ms |
19492 KB |
Output is correct |
49 |
Correct |
37 ms |
19504 KB |
Output is correct |
50 |
Correct |
90 ms |
23100 KB |
Output is correct |
51 |
Correct |
76 ms |
22340 KB |
Output is correct |
52 |
Correct |
65 ms |
21680 KB |
Output is correct |
53 |
Correct |
64 ms |
21656 KB |
Output is correct |
54 |
Correct |
57 ms |
20272 KB |
Output is correct |
55 |
Correct |
106 ms |
23476 KB |
Output is correct |
56 |
Correct |
80 ms |
22984 KB |
Output is correct |
57 |
Correct |
85 ms |
22832 KB |
Output is correct |
58 |
Correct |
39 ms |
23164 KB |
Output is correct |
59 |
Correct |
41 ms |
23004 KB |
Output is correct |
60 |
Correct |
62 ms |
22400 KB |
Output is correct |
61 |
Correct |
65 ms |
23348 KB |
Output is correct |
62 |
Correct |
47 ms |
20352 KB |
Output is correct |
63 |
Correct |
56 ms |
23364 KB |
Output is correct |
64 |
Correct |
57 ms |
23080 KB |
Output is correct |
65 |
Correct |
73 ms |
23112 KB |
Output is correct |
66 |
Correct |
40 ms |
23060 KB |
Output is correct |
67 |
Correct |
43 ms |
23380 KB |
Output is correct |
68 |
Correct |
48 ms |
23068 KB |
Output is correct |
69 |
Correct |
68 ms |
23316 KB |
Output is correct |
70 |
Correct |
81 ms |
23192 KB |
Output is correct |
71 |
Runtime error |
119 ms |
262144 KB |
Execution killed with signal 9 |
72 |
Halted |
0 ms |
0 KB |
- |