# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
1070090 | 2024-08-22T11:37:21 Z | YassirSalama | Toys (CEOI18_toy) | C++17 | 1 ms | 832 KB |
#include<bits/stdc++.h> using namespace std; #define pb push_back int n; const int maxn=1e5+10; int dp[maxn]; vector<int> factor(int n){ vector<int> d; for(int i=1;i*i<=n;i++){ if(n%i==0){ int a=i; int b=n/a; if(a==b){ d.pb(a); }else{ d.pb(a); d.pb(b); } } } return d; } int main(){ memset(dp,-1,sizeof(dp)); cin>>n; vector<int> d=factor(n); int ans=0; set<int> s; for(auto x:d){ for(auto y:d){ for(auto z:d){ for(auto a:d){ if(x*y*a*z==n){ s.insert(x+y+z+a-4); } } } } } cout<<s.size()<<endl; for(auto x:s){ cout<<x<<" "; } cout<<endl; }
Compilation message
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 600 KB | Output is correct |
2 | Correct | 0 ms | 604 KB | Output is correct |
3 | Correct | 0 ms | 604 KB | Output is correct |
4 | Correct | 0 ms | 604 KB | Output is correct |
5 | Correct | 0 ms | 604 KB | Output is correct |
6 | Correct | 0 ms | 604 KB | Output is correct |
7 | Correct | 0 ms | 604 KB | Output is correct |
8 | Correct | 0 ms | 604 KB | Output is correct |
9 | Correct | 1 ms | 604 KB | Output is correct |
10 | Correct | 1 ms | 604 KB | Output is correct |
11 | Correct | 1 ms | 604 KB | Output is correct |
12 | Correct | 0 ms | 604 KB | Output is correct |
13 | Correct | 0 ms | 832 KB | Output is correct |
14 | Correct | 1 ms | 604 KB | Output is correct |
15 | Correct | 0 ms | 604 KB | Output is correct |
16 | Correct | 1 ms | 600 KB | Output is correct |
17 | Correct | 0 ms | 604 KB | Output is correct |
18 | Correct | 0 ms | 604 KB | Output is correct |
19 | Correct | 0 ms | 604 KB | Output is correct |
20 | Correct | 0 ms | 604 KB | Output is correct |
21 | Correct | 1 ms | 600 KB | Output is correct |
22 | Correct | 0 ms | 604 KB | Output is correct |
23 | Correct | 0 ms | 600 KB | Output is correct |
24 | Incorrect | 0 ms | 604 KB | Output isn't correct |
25 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 600 KB | Output is correct |
2 | Correct | 0 ms | 604 KB | Output is correct |
3 | Correct | 0 ms | 604 KB | Output is correct |
4 | Correct | 0 ms | 604 KB | Output is correct |
5 | Correct | 0 ms | 604 KB | Output is correct |
6 | Correct | 0 ms | 604 KB | Output is correct |
7 | Correct | 0 ms | 604 KB | Output is correct |
8 | Correct | 0 ms | 604 KB | Output is correct |
9 | Correct | 1 ms | 604 KB | Output is correct |
10 | Correct | 1 ms | 604 KB | Output is correct |
11 | Correct | 1 ms | 604 KB | Output is correct |
12 | Correct | 0 ms | 604 KB | Output is correct |
13 | Correct | 0 ms | 832 KB | Output is correct |
14 | Correct | 1 ms | 604 KB | Output is correct |
15 | Correct | 0 ms | 604 KB | Output is correct |
16 | Correct | 1 ms | 600 KB | Output is correct |
17 | Correct | 0 ms | 604 KB | Output is correct |
18 | Correct | 0 ms | 604 KB | Output is correct |
19 | Correct | 0 ms | 604 KB | Output is correct |
20 | Correct | 0 ms | 604 KB | Output is correct |
21 | Correct | 1 ms | 600 KB | Output is correct |
22 | Correct | 0 ms | 604 KB | Output is correct |
23 | Correct | 0 ms | 600 KB | Output is correct |
24 | Incorrect | 0 ms | 604 KB | Output isn't correct |
25 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 600 KB | Output is correct |
2 | Correct | 0 ms | 604 KB | Output is correct |
3 | Correct | 0 ms | 604 KB | Output is correct |
4 | Correct | 0 ms | 604 KB | Output is correct |
5 | Correct | 0 ms | 604 KB | Output is correct |
6 | Correct | 0 ms | 604 KB | Output is correct |
7 | Correct | 0 ms | 604 KB | Output is correct |
8 | Correct | 0 ms | 604 KB | Output is correct |
9 | Correct | 1 ms | 604 KB | Output is correct |
10 | Correct | 1 ms | 604 KB | Output is correct |
11 | Correct | 1 ms | 604 KB | Output is correct |
12 | Correct | 0 ms | 604 KB | Output is correct |
13 | Correct | 0 ms | 832 KB | Output is correct |
14 | Correct | 1 ms | 604 KB | Output is correct |
15 | Correct | 0 ms | 604 KB | Output is correct |
16 | Correct | 1 ms | 600 KB | Output is correct |
17 | Correct | 0 ms | 604 KB | Output is correct |
18 | Correct | 0 ms | 604 KB | Output is correct |
19 | Correct | 0 ms | 604 KB | Output is correct |
20 | Correct | 0 ms | 604 KB | Output is correct |
21 | Correct | 1 ms | 600 KB | Output is correct |
22 | Correct | 0 ms | 604 KB | Output is correct |
23 | Correct | 0 ms | 600 KB | Output is correct |
24 | Incorrect | 0 ms | 604 KB | Output isn't correct |
25 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 600 KB | Output is correct |
2 | Correct | 0 ms | 604 KB | Output is correct |
3 | Correct | 0 ms | 604 KB | Output is correct |
4 | Correct | 0 ms | 604 KB | Output is correct |
5 | Correct | 0 ms | 604 KB | Output is correct |
6 | Correct | 0 ms | 604 KB | Output is correct |
7 | Correct | 0 ms | 604 KB | Output is correct |
8 | Correct | 0 ms | 604 KB | Output is correct |
9 | Correct | 1 ms | 604 KB | Output is correct |
10 | Correct | 1 ms | 604 KB | Output is correct |
11 | Correct | 1 ms | 604 KB | Output is correct |
12 | Correct | 0 ms | 604 KB | Output is correct |
13 | Correct | 0 ms | 832 KB | Output is correct |
14 | Correct | 1 ms | 604 KB | Output is correct |
15 | Correct | 0 ms | 604 KB | Output is correct |
16 | Correct | 1 ms | 600 KB | Output is correct |
17 | Correct | 0 ms | 604 KB | Output is correct |
18 | Correct | 0 ms | 604 KB | Output is correct |
19 | Correct | 0 ms | 604 KB | Output is correct |
20 | Correct | 0 ms | 604 KB | Output is correct |
21 | Correct | 1 ms | 600 KB | Output is correct |
22 | Correct | 0 ms | 604 KB | Output is correct |
23 | Correct | 0 ms | 600 KB | Output is correct |
24 | Incorrect | 0 ms | 604 KB | Output isn't correct |
25 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 600 KB | Output is correct |
2 | Correct | 0 ms | 604 KB | Output is correct |
3 | Correct | 0 ms | 604 KB | Output is correct |
4 | Correct | 0 ms | 604 KB | Output is correct |
5 | Correct | 0 ms | 604 KB | Output is correct |
6 | Correct | 0 ms | 604 KB | Output is correct |
7 | Correct | 0 ms | 604 KB | Output is correct |
8 | Correct | 0 ms | 604 KB | Output is correct |
9 | Correct | 1 ms | 604 KB | Output is correct |
10 | Correct | 1 ms | 604 KB | Output is correct |
11 | Correct | 1 ms | 604 KB | Output is correct |
12 | Correct | 0 ms | 604 KB | Output is correct |
13 | Correct | 0 ms | 832 KB | Output is correct |
14 | Correct | 1 ms | 604 KB | Output is correct |
15 | Correct | 0 ms | 604 KB | Output is correct |
16 | Correct | 1 ms | 600 KB | Output is correct |
17 | Correct | 0 ms | 604 KB | Output is correct |
18 | Correct | 0 ms | 604 KB | Output is correct |
19 | Correct | 0 ms | 604 KB | Output is correct |
20 | Correct | 0 ms | 604 KB | Output is correct |
21 | Correct | 1 ms | 600 KB | Output is correct |
22 | Correct | 0 ms | 604 KB | Output is correct |
23 | Correct | 0 ms | 600 KB | Output is correct |
24 | Incorrect | 0 ms | 604 KB | Output isn't correct |
25 | Halted | 0 ms | 0 KB | - |