23 条题解

  • 4
    @ 2022-1-10 11:45:17
    #include<bits/stdc++.h>
    using namespace std;
    int main()
    {
        int n;
        cin >> n;
        int x = n+1;
        while(x%n != 0)
        	x++;
        cout << x << endl;
        for(int i = 1; i < n; i++)
        {
        	if(n%i == 0)
        		cout << i <<" ";
    	}
    }
    
    • 2
      @ 2022-12-20 21:28:55

      呃,这是一道有点违反常识的题......

      #include<iostream>
      using namespace std;
      int n;
      int main(){
      	cin>>n;
      	cout<<n*2<<endl;//根据题目的设定,n的最小倍数为2n......
      	for(int i=1;i<n;i++){
      		if(n%i==0)cout<<i<<" ";
      	}
      	return 0;
      }
      
      • 1

        可能有些复杂,但能AC。

        但是,n的最小倍数不就是n自身吗??? 有点问题。。。

        #include <bits/stdc++.h>
        using namespace std;
        int n;
        int main()
        {
        	cin>>n;
        	cout<<2*n<<endl;
        	for(int i=1;i<=n-1;i++)
        	{
        		if(n%i==0)
        		{
        			cout<<i<<" ";
        		}
        	}
        	return 0;
        	
        }
        
        • 0
          @ 2024-5-18 23:50:02
          #include<queue>
          #include<math.h>
          #include<stack>
          #include<stdio.h>
          #include<iostream>
          #include<vector>
          #include<iomanip>
          #include<string.h>
          #include<algorithm>
          #include<bits/stdc++.h>
          using namespace std;
          int main(){
              int n;
              cin>>n;
              int x=n+1;
              while(x%n!=0)x++;
              cout<<x<<endl;
              for(int i=1;i<n;i++){
              	if(n%i == 0)cout<<i<<" ";
          	}
          	return 0;
          }
          
          • 0
            @ 2024-3-12 20:59:12
            #include <iostream>
            #include <stdio.h>
            #include <math.h>
            #include <iomanip>
            using namespace std;
            const int N = 1e5 + 10;
            const int INF = 0x3f3f3f3f;
            int n; 
            int main()
            {
            	cin >> n;
            	cout << n * 2 << endl;
            	for( int i = 1 ; i < n ; i++ )
            	{
            		if( n % i == 0 )
            		{
            			cout << i << " ";
            		}
            	}
                return 0;
            }
            
            
            • 0
              @ 2023-3-5 19:57:39
              #include<queue>
              #include<math.h>
              #include<stack>
              #include<stdio.h>
              #include<iostream>
              #include<vector>
              #include<iomanip>
              #include<string.h>
              #include<algorithm>
              #include<bits/stdc++.h>
              using namespace std;
              int main(){
                  int n;
                  cin>>n;
                  int x=n+1;
                  while(x%n!=0)x++;
                  cout<<x<<endl;
                  for(int i=1;i<n;i++){
                  	if(n%i == 0)cout<<i<<" ";
              	}
              	return 0;
              }
              
              
              • 0
                @ 2022-1-10 11:46:58
                #include<iostream>
                #include <math.h>
                #include <stdio.h>
                using namespace std;
                int main()
                {
                	int n;
                	cin >> n;
                	int x = n+1;
                	while(x%n != 0)
                	    x++;
                	cout << x << endl;
                	for(int i = 1; i < n ; i++)
                	{
                		if(n%i == 0)
                		    cout << i << " "; 
                	}
                }
                
                • -1
                  @ 2023-3-9 22:38:49
                  #include<bits/stdc++.h>
                  using namespace std;
                  int main()
                  {
                      int n;
                      cin >> n;
                      int x = n+1;
                      while(x%n != 0)
                      	x++;
                      cout << x << endl;
                      for(int i = 1; i < n; i++)
                      {
                      	if(n%i == 0)
                      		cout << i <<" ";
                  	}
                  }
                  
                  • -2
                    @ 2023-3-31 20:37:16

                    #include<bits/stdc++.h> using namespace std; int main() { int n; cin>>n; cout<<n*2<<endl; for(int i=1;i<n;i++) if(n%i==0) cout<<i<<" "; return 0; }

                    • -2
                      @ 2022-1-10 12:01:38
                      #include<iostream>
                      #include<cstdio>
                      #include<math.h>
                      #include<cstdlib>
                      using namespace std;
                      int main()
                      {
                      	int n;
                      	cin>>n;
                      	int x=n+1;
                      	while(x%n!=0)
                      	{
                      		x++;
                      	}
                      	cout<<x<<endl;
                      	for(int i=1;i<n;i++)
                      	{
                      		if(n%i==0)
                      		{
                      			cout<<i<<" ";
                      		}
                      	}
                      }
                      
                      • -2
                        @ 2022-1-10 12:01:37
                        #include<iostream>
                        #include<cstdio>
                        #include<math.h>
                        #include<cstdlib>
                        using namespace std;
                        int main()
                        {
                        	int n;
                        	cin>>n;
                        	int x=n+1;
                        	while(x%n!=0)
                        	{
                        		x++;
                        	}
                        	cout<<x<<endl;
                        	for(int i=1;i<n;i++)
                        	{
                        		if(n%i==0)
                        		{
                        			cout<<i<<" ";
                        		}
                        	}
                        }
                        
                        • -2
                          @ 2022-1-10 11:46:46
                          #include<iostream>
                          #include <math.h>
                          #include <cmath>
                          #include<bits/stdc++.h>
                          using namespace std;
                          int main()
                          {
                              int n;
                              cin >> n;
                              int x = n+1;
                              while(x%n != 0)
                                  x++;
                              cout << x << endl;
                              for(int i = 1; i < n; i++)
                              {
                                  if(n%i == 0)
                                      cout << i <<" ";
                              }
                          }
                          
                          • -3
                            @ 2022-11-1 11:13:50

                            for循环👀️

                            #include <stdio.h>
                            #include <iostream>
                            #include<iomanip>
                            #include<stdio.h>
                            #include <math.h>
                            using namespace std;
                            int main(){
                            	double a,b,n;
                            	cin>>a;
                            	cout<<a*2<<endl;
                            	for(int i=a;i>1;i--){
                            		b=a*1.0/i;
                            		if(b==ceil(b))cout<<b<<" ";
                            	}
                            }
                            
                            • -3
                              @ 2022-1-10 12:01:35
                              #include<iostream>
                              #include<cstdio>
                              #include<math.h>
                              #include<cstdlib>
                              using namespace std;
                              int main()
                              {
                              	int n;
                              	cin>>n;
                              	int x=n+1;
                              	while(x%n!=0)
                              	{
                              		x++;
                              	}
                              	cout<<x<<endl;
                              	for(int i=1;i<n;i++)
                              	{
                              		if(n%i==0)
                              		{
                              			cout<<i<<" ";
                              		}
                              	}
                              }
                              
                              • -3
                                @ 2022-1-10 12:01:32
                                #include<iostream>
                                #include<cstdio>
                                #include<math.h>
                                #include<cstdlib>
                                using namespace std;
                                int main()
                                {
                                	int n;
                                	cin>>n;
                                	int x=n+1;
                                	while(x%n!=0)
                                	{
                                		x++;
                                	}
                                	cout<<x<<endl;
                                	for(int i=1;i<n;i++)
                                	{
                                		if(n%i==0)
                                		{
                                			cout<<i<<" ";
                                		}
                                	}
                                }
                                
                                • -3
                                  @ 2022-1-10 11:46:00
                                  #include <iostream>
                                  #include <math.h>
                                  #include <iomanip>
                                  using namespace std;
                                  #define LL Long Long
                                  const int N=1e5+10;
                                  const int INF=0x3f3f3f3f;
                                  int main()
                                  {
                                  	int n;
                                  	cin >> n;
                                  	int x = n+1;
                                  	while(x%n != 0)
                                  		x++;
                                  	cout << x << endl;
                                  	for(int i = 1; i < n ; i++)
                                  	{
                                  		if(n%i == 0)
                                  			cout << i << " ";
                                  	}
                                  }	```
                                  • -4
                                    @ 2022-1-10 12:01:32
                                    #include<iostream>
                                    #include<cstdio>
                                    #include<math.h>
                                    #include<cstdlib>
                                    using namespace std;
                                    int main()
                                    {
                                    	int n;
                                    	cin>>n;
                                    	int x=n+1;
                                    	while(x%n!=0)
                                    	{
                                    		x++;
                                    	}
                                    	cout<<x<<endl;
                                    	for(int i=1;i<n;i++)
                                    	{
                                    		if(n%i==0)
                                    		{
                                    			cout<<i<<" ";
                                    		}
                                    	}
                                    }
                                    
                                    • -4
                                      @ 2022-1-10 12:01:32
                                      #include<iostream>
                                      #include<cstdio>
                                      #include<math.h>
                                      #include<cstdlib>
                                      using namespace std;
                                      int main()
                                      {
                                      	int n;
                                      	cin>>n;
                                      	int x=n+1;
                                      	while(x%n!=0)
                                      	{
                                      		x++;
                                      	}
                                      	cout<<x<<endl;
                                      	for(int i=1;i<n;i++)
                                      	{
                                      		if(n%i==0)
                                      		{
                                      			cout<<i<<" ";
                                      		}
                                      	}
                                      }
                                      
                                      • -4
                                        @ 2022-1-10 12:01:32
                                        #include<iostream>
                                        #include<cstdio>
                                        #include<math.h>
                                        #include<cstdlib>
                                        using namespace std;
                                        int main()
                                        {
                                        	int n;
                                        	cin>>n;
                                        	int x=n+1;
                                        	while(x%n!=0)
                                        	{
                                        		x++;
                                        	}
                                        	cout<<x<<endl;
                                        	for(int i=1;i<n;i++)
                                        	{
                                        		if(n%i==0)
                                        		{
                                        			cout<<i<<" ";
                                        		}
                                        	}
                                        }
                                        
                                        • -4
                                          @ 2022-1-10 12:01:31
                                          #include<iostream>
                                          #include<cstdio>
                                          #include<math.h>
                                          #include<cstdlib>
                                          using namespace std;
                                          int main()
                                          {
                                          	int n;
                                          	cin>>n;
                                          	int x=n+1;
                                          	while(x%n!=0)
                                          	{
                                          		x++;
                                          	}
                                          	cout<<x<<endl;
                                          	for(int i=1;i<n;i++)
                                          	{
                                          		if(n%i==0)
                                          		{
                                          			cout<<i<<" ";
                                          		}
                                          	}
                                          }
                                          

                                          信息

                                          ID
                                          964
                                          时间
                                          1000ms
                                          内存
                                          256MiB
                                          难度
                                          3
                                          标签
                                          递交数
                                          460
                                          已通过
                                          260
                                          上传者