Language: C++

#include <iostream>
#include <sstream>
#include <stdio.h>
#include <ctype.h>
#include <vector>
#include <string>
#include <algorithm>
using namespace std;
typedef  vector< vector<int> > vector2d;


string IntToString(int number)
{
  stringstream ss;
  ss << number;
  return ss.str();
}

int main (){

  int i,j,n;
  vector<int> prime;
  
  int judge[300000]={};

  for(i=0;i<42857;i++){
    judge[i*7+1] = 1;
    judge[i*7+6] = 1;
  }
  judge[1] = 0;
  
  //素数リスト作成
  for(i=6;i<300000;i++){
    if (judge[i]==1){
      prime.push_back(i);
      for(j=2;j<300000/i;j++){
	judge[j*i]=0;
      }
    }
  }
  prime.push_back(300000);
  
  while(1){
    cin >> n;
    if (n==1)break;
    
    string ans;
    ans = IntToString(n) + ":";
    
    for(i=0;prime[i]<=n;i++){
      if(n%prime[i]==0){
        ans += " " + IntToString(prime[i]);
      }
    }
    
    cout << ans << endl;
    
  }
  
  return 0;
}#include <iostream>
#include <sstream>
#include <stdio.h>
#include <ctype.h>
#include <vector>
#include <string>
#include <algorithm>
using namespace std;
typedef  vector< vector<int> > vector2d;


string IntToString(int number)
{
  stringstream ss;
  ss << number;
  return ss.str();
}

int main (){

  int i,j,n;
  vector<int> prime;
  
  int judge[300000]={};

  for(i=0;i<42857;i++){
    judge[i*7+1] = 1;
    judge[i*7+6] = 1;
  }
  judge[1] = 0;
  
  //素数リスト作成
  for(i=6;i<300000;i++){
    if (judge[i]==1){
      prime.push_back(i);
      for(j=2;j<300000/i;j++){
	judge[j*i]=0;
      }
    }
  }
  prime.push_back(300000);
  
  while(1){
    cin >> n;
    if (n==1)break;
    
    string ans;
    ans = IntToString(n) + ":";
    
    for(i=0;prime[i]<=n;i++){
      if(n%prime[i]==0){
        ans += " " + IntToString(prime[i]);
      }
    }
    
    cout << ans << endl;
    
  }
  
  return 0;
}#include <iostream>
#include <sstream>
#include <stdio.h>
#include <ctype.h>
#include <vector>
#include <string>
#include <algorithm>
using namespace std;
typedef  vector< vector<int> > vector2d;


string IntToString(int number)
{
  stringstream ss;
  ss << number;
  return ss.str();
}

int main (){

  int i,j,n;
  vector<int> prime;
  
  int judge[300000]={};

  for(i=0;i<42857;i++){
    judge[i*7+1] = 1;
    judge[i*7+6] = 1;
  }
  judge[1] = 0;
  
  //素数リスト作成
  for(i=6;i<300000;i++){
    if (judge[i]==1){
      prime.push_back(i);
      for(j=2;j<300000/i;j++){
	judge[j*i]=0;
      }
    }
  }
  prime.push_back(300000);
  
  while(1){
    cin >> n;
    if (n==1)break;
    
    string ans;
    ans = IntToString(n) + ":";
    
    for(i=0;prime[i]<=n;i++){
      if(n%prime[i]==0){
        ans += " " + IntToString(prime[i]);
      }
    }
    
    cout << ans << endl;
    
  }
  
  return 0;
}

Compiler output:
a.cc:61:2: error: stray '#' in program
   61 | }#include <iostream>
      |  ^
a.cc:121:2: error: stray '#' in program
  121 | }#include <iostream>
      |  ^
a.cc:61:3: error: 'include' does not name a type
   61 | }#include <iostream>
      |   ^~~~~~~
a.cc:72:8: error: redefinition of 'std::string IntToString(int)'
   72 | string IntToString(int number)
      |        ^~~~~~~~~~~
a.cc:12:8: note: 'std::string IntToString(int)' previously defined here
   12 | string IntToString(int number)
      |        ^~~~~~~~~~~
a.cc:79:5: error: redefinition of 'int main()'
   79 | int main (){
      |     ^~~~
a.cc:19:5: note: 'int main()' previously defined here
   19 | int main (){
      |     ^~~~
a.cc:121:3: error: 'include' does not name a type
  121 | }#include <iostream>
      |   ^~~~~~~
a.cc:132:8: error: redefinition of 'std::string IntToString(int)'
  132 | string IntToString(int number)
      |        ^~~~~~~~~~~
a.cc:12:8: note: 'std::string IntToString(int)' previously defined here
   12 | string IntToString(int number)
      |        ^~~~~~~~~~~
a.cc:139:5: error: redefinition of 'int main()'
  139 | int main (){
      |     ^~~~
a.cc:19:5: note: 'int main()' previously defined here
   19 | int main (){
      |     ^~~~