Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<bits/stdc++.h>
- using namespace std;
- int main()
- {
- int t,i,j,k,n,a,b,c,d,div[1000],order[10000],e,f,count=0;
- for(i=1;i<=1000;i++)
- {
- a=i;
- count=0;
- for(j=1;j<=a;j++)
- {
- if(a%j==0)
- {
- count++;
- }
- }
- div[a]=count;
- }
- k=0;
- for(i=1;i<=1000;i++)
- {
- for(j=1000;j>=1;j--)
- {
- if(div[j]==i)
- order[++k]=j;
- }
- }
- cin>>t;
- for(i=1;i<=t;i++)
- {
- cin>>n;
- cout<<"Case "<<i<<": "<<order[n]<<endl;
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement