criyle/codenet-compile-errors huggingface dataset:
Language: C

#include<stdio.h>
#include<math.h>

isPrime(int n)
{
    int i, m;
    if (i == 2) return 1;
    m = sqrt(n);
    for (i = 3; i < m; i += 2)
        if (n % i == 0) return 1;
    return 0;
}

int main2(void)
{
    int n, max, i;
    scanf("%d", &n);
    max = sqrt(n);
    printf("%d:");
    while (n % 2 == 0) {
        printf(" 2");
        n %= 2;
    }
    for (i = 3; i <= max; i += 2) {
        if (isPrime(i)) {
            while (n % i == 0) {
                printf(" %d", i);
                n %= i;
            }
        }
    }
    printf("\n");
}
main()
{
  int i, n;
   
  scanf("%d", &n);
  printf("%d:", n);
  for (i = 2; i * i <= n; ) {
    if (n % i == 0) {
      printf(" %d", i);
      n /= i;
    } else {
      ++i;
    }
  }
  printf(" %d\n", n);
   
  return EXIT_SUCCESS;
}


            



Compiler output:
main.c:4:1: error: return type defaults to 'int' [-Wimplicit-int]
    4 | isPrime(int n)
      | ^~~~~~~
main.c:34:1: error: return type defaults to 'int' [-Wimplicit-int]
   34 | main()
      | ^~~~
main.c: In function 'main':
main.c:50:10: error: 'EXIT_SUCCESS' undeclared (first use in this function)
   50 |   return EXIT_SUCCESS;
      |          ^~~~~~~~~~~~
main.c:3:1: note: 'EXIT_SUCCESS' is defined in header '<stdlib.h>'; this is probably fixable by adding '#include <stdlib.h>'
    2 | #include<math.h>
  +++ |+#include <stdlib.h>
    3 | 
main.c:50:10: note: each undeclared identifier is reported only once for each function it appears in
   50 |   return EXIT_SUCCESS;
      |          ^~~~~~~~~~~~
Language: C

#include<stdio.h>
#include<math.h>

isPrime(int n)
{
    int i, m;
    if (i == 2) return 1;
    m = sqrt(n);
    for (i = 3; i < m; i += 2)
        if (n % i == 0) return 1;
    return 0;
}

int main(void)
{
    int n, max, i;
    scanf("%d", &n);
    max = sqrt(n);
    printf("%d:");
    while (n % 2 == 0) {
        printf(" 2");
        n %= 2;
    }
    for (i = 3; i <= max; i += 2) {
        if (isPrime(i)) {
            while (n % i == 0) {
                printf(" %d", i);
                n/%= i;
            }
        }
    }
    printf("\n");
}



            



Compiler output:
main.c:4:1: error: return type defaults to 'int' [-Wimplicit-int]
    4 | isPrime(int n)
      | ^~~~~~~
main.c: In function 'main':
main.c:28:19: error: expected expression before '%=' token
   28 |                 n/%= i;
      |                   ^~
Language: C++

#include<iostream>
using namespace std;

//素数判定(素数ならtrue)
bool Prime(int prime)
{
	//偶数除く
	if (prime == 2) {
		return true;
	}
	else if (prime % 2 == 0 || prime < 2) {
		return false;
	}

	float Asqrt = sqrtf(prime);

	for (int i = 3; i <= Asqrt; i += 2) {
		if (prime%i == 0) {
			return false;
		}
	}

	return true;
}

int main()
{
	int n;

	cin >> n;
	
	cout << n << ":";

	for (int prime = 2;; prime++) {

		if (Prime(n)) {
			cout << " " << n << endl;
			break;
		}

		while (true)
		{
			//素数 かつ 素因数の場合
			if (Prime(prime) && n%prime == 0) {
				n /= prime;
				cout << " " << prime;
				
				//分解可能なら続ける
				continue;
			}

			//分解不可でbreak;
			break;
		}

	}

	return 0;
}


Compiler output:
a.cc: In function 'bool Prime(int)':
a.cc:15:23: error: 'sqrtf' was not declared in this scope
   15 |         float Asqrt = sqrtf(prime);
      |                       ^~~~~
Language: C++

#include <bits/stdc++.h>
typedef long long LL;
using namespace std;

int main(){
  int n;
  cin >> n;
  cout << n << ":";
  int m = sqrt(n);
  for (n % 2 == 0) {
    n /= 2;
    cout << " " << 2;
  }

  int i = 3;
  while (i <= m) {
    if (n % i == 0) {
      cout << " " << i;
      n /= i;
    } else {
      i += 2;
    }
  }
  if (n != 1) {
    cout << n << endl;
  }
  cout << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:18: error: expected ';' before ')' token
   10 |   for (n % 2 == 0) {
      |                  ^
      |                  ;
a.cc:16:3: error: expected primary-expression before 'while'
   16 |   while (i <= m) {
      |   ^~~~~
a.cc:15:13: error: expected ')' before 'while'
   15 |   int i = 3;
      |             ^
      |             )
   16 |   while (i <= m) {
      |   ~~~~~      
a.cc:10:7: note: to match this '('
   10 |   for (n % 2 == 0) {
      |       ^
Language: C++

#include<stdio.h>
#include<string.h>
#include<iostream>
#include<fstream>
using namespace std;

int main(){
	std::istream & c_in = cin;

	int n;
	c_in >> n;
	cout << n << ":";

	int primes=0;
	int i = 2;
	while (n != 1)
	{
		if ((n % i) == 0) {
			n /= i;
			cout << " " << i;
			continue;
		}
		i += 1 + (i & 1);
		if (i > ::sqrt(n))
		{
			cout << " " << n;
			break;
		}
	}
	cout << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:24:27: error: '::sqrt' has not been declared
   24 |                 if (i > ::sqrt(n))
      |                           ^~~~
Language: C++

#include <iostream>
#include <vector>

std::vector<int> get_primes(int);
bool is_prime(std::vector<int>&, int);

int main() {
	int n;
	std::vector<int> prime, fact;
	std::cin >> n;
	prime = get_primes(n);
	while ( !is_prime(prime, n) ) {
		for (auto i : prime) {
			if (n % i == 0) {
				fact.push_back(i);
				n /= i;
				break;
			}
		}
	}
	for (auto i : fact) {
		std::cout << i << " ";
	}
	std::cout << n << std::endl;
}

std::vector<int> get_primes(int n) {
	int *not_prime = new int[n+1]();
	std::vector<int> v;
	for (int i=2; i<=n; i++) {
		if (not_prime[i] == 0) {
			v.push_back(i);
			if (i * i < n) {
				for (int j=i; j*i<=n; j++) {
					not_prime[j*i] = 1;
				}
			}
		}
	}
	delete[] not_prime;
	return v;
}

bool is_prime(std::vector<int>& v, int n) {
	std::vector<int>::iterator Iter = find(v.begin(), v.end(), n);
	if( Iter != v.end() ){
  		return true;
	} else {
		return false;
	}
}

Compiler output:
a.cc: In function 'bool is_prime(std::vector<int>&, int)':
a.cc:45:47: error: no matching function for call to 'find(std::vector<int>::iterator, std::vector<int>::iterator, int&)'
   45 |         std::vector<int>::iterator Iter = find(v.begin(), v.end(), n);
      |                                           ~~~~^~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/bits/locale_facets.h:48,
                 from /usr/include/c++/14/bits/basic_ios.h:37,
                 from /usr/include/c++/14/ios:46,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/streambuf_iterator.h:435:5: note: candidate: 'template<class _CharT2> typename __gnu_cxx::__enable_if<std::__is_char<_CharT2>::__value, std::istreambuf_iterator<_CharT> >::__type std::find(istreambuf_iterator<_CharT>, istreambuf_iterator<_CharT>, const _CharT2&)'
  435 |     find(istreambuf_iterator<_CharT> __first,
      |     ^~~~
/usr/include/c++/14/bits/streambuf_iterator.h:435:5: note:   template argument deduction/substitution failed:
a.cc:45:47: note:   '__gnu_cxx::__normal_iterator<int*, std::vector<int> >' is not derived from 'std::istreambuf_iterator<_CharT>'
   45 |         std::vector<int>::iterator Iter = find(v.begin(), v.end(), n);
      |                                           ~~~~^~~~~~~~~~~~~~~~~~~~~~~
Language: C++

#include <iostream>
#include <algorithm>
#include <vector>
#include <cstdint>
#include <cmath>

std::vector<uint32_t> get_primes_fact(uint32_t);
bool is_prime(std::vector<uint32_t>&, uint32_t);

int main() {
	uint32_t n, raw;
	std::cin >> n;
	std::vector<uint32_t>&& prime = get_primes_fact(n);
	raw = n;
	std::cout << raw << ": ";
	while ( !is_prime(prime, n) ) {
		for (auto i : prime) {
			if (n % i == 0) {
				std::cout << i << " ";
				n /= i;
				break;
			}
		}
	}
	std::cout << n << std::endl;
}

std::vector<uint32_t> get_primes_fact(uint32_t n) {
	constexpr uint32_t LIST_MAX = 1048576; // 20bit
	uint32_t n_p = n / LIST_MAX;
	uint32_t n_s;
	uint32_t area = 0;
	std::vector<uint32_t> primes, prime_facts;
	int8_t* not_prime;
	do {
		//std::cout << area << std::endl;
		if (area + 1 < n_p) {
			n_s = LIST_MAX + 1;
			not_prime = new int8_t[n_s]();
		} else {
			n_s = (n_p == 0) ? n + 1 : n + 1 - (n_p - 1) * LIST_MAX;
			not_prime = new int8_t[n_s]();
		}
		for (auto prime : primes) {
			if ( prime <= sqrt(n) ) {
				for (uint32_t i = area*LIST_MAX/prime+1; i*prime < area*LIST_MAX+n_s; i++) {
					not_prime[i*prime - area*LIST_MAX] = 1;
				}
			}
		}
		for (uint32_t i=(area>0)?1:2; i<n_s; i++) {
			if (not_prime[i] == 0) {
				primes.push_back(area * LIST_MAX + i);
				//if (n % (area * LIST_MAX + i) == 0) {
				//	prime_facts.push_back(area * LIST_MAX + i);
				//}
				if (area == 0 && i * i <= n) {
					for (uint32_t j=i; j*i<=n_s; j++) {
						not_prime[j*i] = 1;
					}
				}
			}
		}
		delete[] not_prime;
		area++;
	} while (area <= n_p);
	//return prime_facts;
	return prime;
}

bool is_prime(std::vector<uint32_t>& v, uint32_t n) {
	std::vector<uint32_t>::iterator Iter = find(v.begin(), v.end(), n);
	if( Iter != v.end() ){
  		return true;
	} else {
		return false;
	}
}

Compiler output:
a.cc: In function 'std::vector<unsigned int> get_primes_fact(uint32_t)':
a.cc:68:16: error: 'prime' was not declared in this scope; did you mean 'primes'?
   68 |         return prime;
      |                ^~~~~
      |                primes
Language: C++

#include <iostream>
using namesapce std;

int n;
int main() {
	cin >> n;
	cout << n << ":";
	int k=2;
	while(n !=1) {
		while(n%k!=0) ++k;
		cout << " " << k;
		n = n /k;
		k=2;
	}
}

Compiler output:
a.cc:2:7: error: expected nested-name-specifier before 'namesapce'
    2 | using namesapce std;
      |       ^~~~~~~~~
a.cc: In function 'int main()':
a.cc:6:9: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    6 |         cin >> n;
      |         ^~~
      |         std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:7:9: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    7 |         cout << n << ":";
      |         ^~~~
      |         std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
Language: C++

#include <iostream>
using namespace std;

int n;
int a[1000000000];
int devidenumber(int n) {
	if(a[n]!=0) return n/a[n];
	else {
		int k=2;
		while(n%k!=0) ++k;
		a[n]=k;
		return n/k;
		}

int main() {
	cin >> n;
	cout << n << ":";
	while(n !=1) {
		int m = devidenumber(n);
		cout << " " << a[n];
		n = m;
	}
	cout << endl;
}

Compiler output:
a.cc: In function 'int devidenumber(int)':
a.cc:15:9: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse]
   15 | int main() {
      |         ^~
a.cc:15:9: note: remove parentheses to default-initialize a variable
   15 | int main() {
      |         ^~
      |         --
a.cc:15:9: note: or replace parentheses with braces to value-initialize a variable
a.cc:15:12: error: a function-definition is not allowed here before '{' token
   15 | int main() {
      |            ^
a.cc:24:2: error: expected '}' at end of input
   24 | }
      |  ^
a.cc:6:25: note: to match this '{'
    6 | int devidenumber(int n) {
      |                         ^
Language: C++

#include <iostream>
using namespace std;

int a[2000000000];
int devidenumber(int m) {
	if(a[m]!=0) return m/a[m];
	else {
		int k=2;
		while(m%k!=0) ++k;
		a[m]=k;
		return m/k;
	}
}

int n;
int main() {
	cin >> n;
	cout << n << ":";
	while(n !=1) {
		int m = devidenumber(n);
		cout << " " << a[n];
		n = m;
	}
	cout << endl;
}

Compiler output:
/tmp/ccr5icNO.o: in function `main':
a.cc:(.text+0x89): relocation truncated to fit: R_X86_64_PC32 against symbol `n' defined in .bss section in /tmp/ccr5icNO.o
a.cc:(.text+0xa1): relocation truncated to fit: R_X86_64_PC32 against symbol `n' defined in .bss section in /tmp/ccr5icNO.o
a.cc:(.text+0xcf): relocation truncated to fit: R_X86_64_PC32 against symbol `n' defined in .bss section in /tmp/ccr5icNO.o
a.cc:(.text+0xfb): relocation truncated to fit: R_X86_64_PC32 against symbol `n' defined in .bss section in /tmp/ccr5icNO.o
a.cc:(.text+0x122): relocation truncated to fit: R_X86_64_PC32 against symbol `n' defined in .bss section in /tmp/ccr5icNO.o
a.cc:(.text+0x128): relocation truncated to fit: R_X86_64_PC32 against symbol `n' defined in .bss section in /tmp/ccr5icNO.o
collect2: error: ld returned 1 exit status
Language: C++

#include <iostream>
#include <cmath>
using namespace std;

int N;
int n = sqrt(N);
int a[1000000000];
int j = 0;

int main(){
  cin >> N;
  int M = N;
  int n = sqrt(N);
  for(int i = 2; i <= n; i++){
    while (N % i == 0){
	  N = N / i;
	  a[j] = i;
	  j++;
	  }
    }
 std::cout << M << ":" << std::flush;
 for (int l = 0; l <= j - 1; l++){
  std::cout << " " << a[l] << std::flush;
   }
  }

Compiler output:
/tmp/cczqDpWp.o: in function `main':
a.cc:(.text+0x59): relocation truncated to fit: R_X86_64_PC32 against symbol `j' defined in .bss section in /tmp/cczqDpWp.o
a.cc:(.text+0x76): relocation truncated to fit: R_X86_64_PC32 against symbol `j' defined in .bss section in /tmp/cczqDpWp.o
a.cc:(.text+0x7f): relocation truncated to fit: R_X86_64_PC32 against symbol `j' defined in .bss section in /tmp/cczqDpWp.o
a.cc:(.text+0x138): relocation truncated to fit: R_X86_64_PC32 against symbol `j' defined in .bss section in /tmp/cczqDpWp.o
collect2: error: ld returned 1 exit status
Language: C++

#include <iostream>
#include <cmath>
using namespace std;

int N;
int n = sqrt(N);
int a[1000000000];
int j = 0;

int main(){
  cin >> N;
  int M = N;
  int n = sqrt(N);
  for(int i = 2; i <= n; i++){
    while (N % i == 0){
	  N = N / i;
	  a[j] = i;
	  j++;
	  }
    }
 std::cout << M << ":" << std::flush;
 for (int l = 0; l <= j - 1; l++){
  std::cout << " " << a[l] << std::flush;
   }
  }

Compiler output:
/tmp/cc6yJiyS.o: in function `main':
a.cc:(.text+0x59): relocation truncated to fit: R_X86_64_PC32 against symbol `j' defined in .bss section in /tmp/cc6yJiyS.o
a.cc:(.text+0x76): relocation truncated to fit: R_X86_64_PC32 against symbol `j' defined in .bss section in /tmp/cc6yJiyS.o
a.cc:(.text+0x7f): relocation truncated to fit: R_X86_64_PC32 against symbol `j' defined in .bss section in /tmp/cc6yJiyS.o
a.cc:(.text+0x138): relocation truncated to fit: R_X86_64_PC32 against symbol `j' defined in .bss section in /tmp/cc6yJiyS.o
collect2: error: ld returned 1 exit status
Language: C++

#include <iostream>
#include <cmath>
using namespace std;

int N;
int n = sqrt(N);
int a[1000000000];
int j = 0;

int main(){
  cin >> N;
  int M = N;
  int n = sqrt(N);
  for(int i = 2; i <= n; i++){
    while (N % i == 0){
	  N = N / i;
	  a[j] = i;
	  j++;
	  }
    }
 std::cout << M << ":" << std::flush;
 for (int l = 0; l <= j - 1; l++){
  std::cout << " " << a[l] << std::flush;
   }
  }

Compiler output:
/tmp/cce8riWY.o: in function `main':
a.cc:(.text+0x59): relocation truncated to fit: R_X86_64_PC32 against symbol `j' defined in .bss section in /tmp/cce8riWY.o
a.cc:(.text+0x76): relocation truncated to fit: R_X86_64_PC32 against symbol `j' defined in .bss section in /tmp/cce8riWY.o
a.cc:(.text+0x7f): relocation truncated to fit: R_X86_64_PC32 against symbol `j' defined in .bss section in /tmp/cce8riWY.o
a.cc:(.text+0x138): relocation truncated to fit: R_X86_64_PC32 against symbol `j' defined in .bss section in /tmp/cce8riWY.o
collect2: error: ld returned 1 exit status
Language: C++

#include <iostream>

vector<int> factorize(int n) {
    vector<int> ps;
    for (int i = 2; n != 1; ++i) {
        while (n % i == 0) {
            v.push_back(i);
            n /= i;
        }
    }
    return ps;
}

int main()
{
    using namespace std;

    int n;
    cin >> n;

    vector<int> ps;
    cout << n << ':';
    for (vector<int>::iterator it = ps.begin(); it != ps.end(); ++it) {
        cout << ' ' << *it;
    }
    cout << endl;

    return 0;
}

Compiler output:
a.cc:3:1: error: 'vector' does not name a type
    3 | vector<int> factorize(int n) {
      | ^~~~~~
a.cc: In function 'int main()':
a.cc:21:5: error: 'vector' was not declared in this scope
   21 |     vector<int> ps;
      |     ^~~~~~
a.cc:2:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
    1 | #include <iostream>
  +++ |+#include <vector>
    2 | 
a.cc:21:12: error: expected primary-expression before 'int'
   21 |     vector<int> ps;
      |            ^~~
a.cc:23:17: error: expected primary-expression before 'int'
   23 |     for (vector<int>::iterator it = ps.begin(); it != ps.end(); ++it) {
      |                 ^~~
a.cc:23:49: error: 'it' was not declared in this scope; did you mean 'int'?
   23 |     for (vector<int>::iterator it = ps.begin(); it != ps.end(); ++it) {
      |                                                 ^~
      |                                                 int
a.cc:23:55: error: 'ps' was not declared in this scope
   23 |     for (vector<int>::iterator it = ps.begin(); it != ps.end(); ++it) {
      |                                                       ^~
Language: C++

#include <iostream>

vector<int> factorize(int n) {
    vector<int> ps;
    for (int i = 2; n != 1; ++i) {
        while (n % i == 0) {
            v.push_back(i);
            n /= i;
        }
    }
    return ps;
}

int main()
{
    using namespace std;

    int n;
    cin >> n;

    vector<int> ps = factorize(n);
    cout << n << ':';
    for (vector<int>::iterator it = ps.begin(); it != ps.end(); ++it) {
        cout << ' ' << *it;
    }
    cout << endl;

    return 0;
}

Compiler output:
a.cc:3:1: error: 'vector' does not name a type
    3 | vector<int> factorize(int n) {
      | ^~~~~~
a.cc: In function 'int main()':
a.cc:21:5: error: 'vector' was not declared in this scope
   21 |     vector<int> ps = factorize(n);
      |     ^~~~~~
a.cc:2:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
    1 | #include <iostream>
  +++ |+#include <vector>
    2 | 
a.cc:21:12: error: expected primary-expression before 'int'
   21 |     vector<int> ps = factorize(n);
      |            ^~~
a.cc:23:17: error: expected primary-expression before 'int'
   23 |     for (vector<int>::iterator it = ps.begin(); it != ps.end(); ++it) {
      |                 ^~~
a.cc:23:49: error: 'it' was not declared in this scope; did you mean 'int'?
   23 |     for (vector<int>::iterator it = ps.begin(); it != ps.end(); ++it) {
      |                                                 ^~
      |                                                 int
a.cc:23:55: error: 'ps' was not declared in this scope
   23 |     for (vector<int>::iterator it = ps.begin(); it != ps.end(); ++it) {
      |                                                       ^~
Language: C++

#include <iostream>
#include <vector>

vector<int> factorize(int n) {
    vector<int> ps;
    for (int i = 2; n != 1; ++i) {
        while (n % i == 0) {
            v.push_back(i);
            n /= i;
        }
    }
    return ps;
}

int main()
{
    using namespace std;

    int n;
    cin >> n;

    vector<int> ps = factorize(n);
    cout << n << ':';
    for (vector<int>::iterator it = ps.begin(); it != ps.end(); ++it) {
        cout << ' ' << *it;
    }
    cout << endl;

    return 0;
}

Compiler output:
a.cc:4:1: error: 'vector' does not name a type
    4 | vector<int> factorize(int n) {
      | ^~~~~~
a.cc: In function 'int main()':
a.cc:22:22: error: 'factorize' was not declared in this scope
   22 |     vector<int> ps = factorize(n);
      |                      ^~~~~~~~~
Language: C++

#include <iostream>
#include <vector>

using namespace std;

vector<int> factorize(int n) {
    vector<int> ps;
    for (int i = 2; n != 1; ++i) {
        while (n % i == 0) {
            v.push_back(i);
            n /= i;
        }
    }
    return ps;
}

int main()
{
    int n;
    cin >> n;

    vector<int> ps = factorize(n);
    cout << n << ':';
    for (vector<int>::iterator it = ps.begin(); it != ps.end(); ++it) {
        cout << ' ' << *it;
    }
    cout << endl;

    return 0;
}

Compiler output:
a.cc: In function 'std::vector<int> factorize(int)':
a.cc:10:13: error: 'v' was not declared in this scope
   10 |             v.push_back(i);
      |             ^
Language: C++

#include <iostream>
#include <vector>

using namespace std;

vector<int> factorize(int n) {
    vector<int> ps;

    while (n % 2 == 0) {
        ps.push_back(2);
        n /= 2;
    }
    for (int i = 3; i * i <= n; i += 2) {
        while (n % i == 0) {
            ps.push_back(i);
            n /= i;
        }
    }
    if (ps.size() == 0) ps.sush_back(n);

    return ps;
}

int main()
{
    int n;
    cin >> n;

    vector<int> ps = factorize(n);
    cout << n << ':';
    for (vector<int>::iterator it = ps.begin(); it != ps.end(); ++it) {
        cout << ' ' << *it;
    }
    cout << endl;

    return 0;
}

Compiler output:
a.cc: In function 'std::vector<int> factorize(int)':
a.cc:19:28: error: 'class std::vector<int>' has no member named 'sush_back'; did you mean 'push_back'?
   19 |     if (ps.size() == 0) ps.sush_back(n);
      |                            ^~~~~~~~~
      |                            push_back
Language: C++

#include<cstdio>
#include<cstdlib>
#include<iostream>
#include<algorithm>
#include<vector>
#include<queue>
#include<map>
#include<array>
#include<set>

using namespace std;

int main()
{
	long int n;
	scanf("%ld", &n);

	long int* memo;
	memo = (long int*)malloc(n* sizeof(long int));

	double ceilodd = sqrt(n*1.0);
	long int max = n / 2;

	bool divisable = false;

	memo[0] = 2;
	memo[1] = 3;
	long int cnt = 2;

	for (long int i = 5; i <= ceilodd; i+=2)
	{
		divisable = false;
			
		for (long int j = 3; j < i; j += 2)
		{
			if (i%j == 0)
			{
				divisable = true;
				break;
			}
		}

		if (divisable == false)
			memo[cnt] = i;

		cnt++;
	}

	printf("%lld:", n);

	long int cnt2 = 0;
	while (n != 1)
	{
		while (n%memo[cnt2] == 0)
		{
			printf(" %lld", memo[cnt2]);
			n = n / memo[cnt2];
		}
		cnt2++;
	}

	printf("\n");

	free(memo);
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:21:26: error: 'sqrt' was not declared in this scope
   21 |         double ceilodd = sqrt(n*1.0);
      |                          ^~~~
Language: C++

#include<cstdio>
#include<cmath>

using namespace std;

int main()
{
	long int n;
	scanf("%ld", &n);

	bool divisable = false;

	printf("%ld:", n);

	while (n % 2 == 0)
	{
		printf(" 2");
		n /= 2;
	}
	if (n == 1)goto goal;

	while (n % 3 == 0)
	{
		printf(" 3");
		n /= 3;
	}
	if (n == 1)goto goal;


	double ceilodd = sqrt(n*1.0);

	long int tmp;

	for (long int i = 5; i <= ceilodd; i += 2)
	{
		divisable = false;
		
		tmp = floor(sqrt(1.0*i));
		for (long int j = 3; j <= tmp; j += 2)
		{
			if (i%j == 0)
			{
				divisable = true;
				break;
			}
		}

		if (divisable == false)
		{
			while (n%i == 0)
			{
				printf(" %ld", i);
				n /= i;
			}
			if (n == 1)goto goal;
		}

	}
	
	if (n != 1)
		printf(" %ld", n);

	goal:

		printf("\n");
	
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:63:9: error: jump to label 'goal'
   63 |         goal:
      |         ^~~~
a.cc:27:25: note:   from here
   27 |         if (n == 1)goto goal;
      |                         ^~~~
a.cc:30:16: note:   crosses initialization of 'double ceilodd'
   30 |         double ceilodd = sqrt(n*1.0);
      |                ^~~~~~~
a.cc:63:9: error: jump to label 'goal'
   63 |         goal:
      |         ^~~~
a.cc:20:25: note:   from here
   20 |         if (n == 1)goto goal;
      |                         ^~~~
a.cc:30:16: note:   crosses initialization of 'double ceilodd'
   30 |         double ceilodd = sqrt(n*1.0);
      |                ^~~~~~~
Language: C++

#include <bits/stdc++.h>

using namespace std;

int main()
{
    long long n;
         cin>>n;
   cout<<n<<": :
    for(int i=2;i<=n;i++)
      while(n%i==0){
        cout<<i<<" ";
        n/=i;
         }
}
    

Compiler output:
a.cc:9:13: warning: missing terminating " character
    9 |    cout<<n<<": :
      |             ^
a.cc:9:13: error: missing terminating " character
    9 |    cout<<n<<": :
      |             ^~~~
a.cc: In function 'int main()':
a.cc:10:5: error: expected primary-expression before 'for'
   10 |     for(int i=2;i<=n;i++)
      |     ^~~
a.cc:10:17: error: 'i' was not declared in this scope
   10 |     for(int i=2;i<=n;i++)
      |                 ^
Language: C++

#include<iostream>
using namespace std;int k,i=2;main() {cin>>k;cout<<k<<":";while (i<=sqrt(k)){if(k%i == 0){cout<<' '<<i;k/=i;}else{i++;}}if(k-1){cout<<' '<<k;}cout<<endl;}

Compiler output:
a.cc:2:31: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    2 | using namespace std;int k,i=2;main() {cin>>k;cout<<k<<":";while (i<=sqrt(k)){if(k%i == 0){cout<<' '<<i;k/=i;}else{i++;}}if(k-1){cout<<' '<<k;}cout<<endl;}
      |                               ^~~~
a.cc: In function 'int main()':
a.cc:2:69: error: 'sqrt' was not declared in this scope
    2 | using namespace std;int k,i=2;main() {cin>>k;cout<<k<<":";while (i<=sqrt(k)){if(k%i == 0){cout<<' '<<i;k/=i;}else{i++;}}if(k-1){cout<<' '<<k;}cout<<endl;}
      |                                                                     ^~~~
Language: C++

#include<iostream>
#include<string>
#include<algorithm>
#include<stack>
#include<queue>
#include<set>
using namespace std;
int main()
{
	int a, b, c, d, e, f[1000], g[1000], h[1000], i, j, k, l, m, n, o, p, q, r;
	cin >> a;
	e=0;
	c = a;
	cout <<a<<":";
	for (int x = 2; a>x; x++)
	{
		b = c%x;
		while (1)
		{
			if (b == 0)
			{
				c = c / x;
				b = c%x;
				cout << " " << x;
			}
			else
			{
				break;
			}
		}
		e++;
	}
	getchar();
	getchar()
}

Compiler output:
a.cc: In function 'int main()':
a.cc:34:18: error: expected ';' before '}' token
   34 |         getchar()
      |                  ^
      |                  ;
   35 | }
      | ~
Language: C++

#include<iostream>
#include<stdio.h>
#include<math.h>

using namespace std;

int n[2], result[100];

int main()
{
	scanf_s("%d", &n[0]);

	n[1] = n[0];

	int a = 2;
	int b = 0;

	while (a < sqrt(n[0]))
	{
		if (n[1] % a == 0)
		{
			result[b] = a;
			n[1] /= a;
			b++;
		}
		else
		{
			a++;
		}
	}

	if (result[0] == 0)
	{
		printf_s("%d: %d\n", n[0], n[0]);
	}
	else
	{
		printf_s("%d:", n[0]);
		for (int x = 0; x < b - 1; x++)
		{
			printf_s(" %d", result[x]);
		}
		printf_s(" %d\n", result[b - 1]);
	}

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:9: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'?
   11 |         scanf_s("%d", &n[0]);
      |         ^~~~~~~
      |         scanf
a.cc:34:17: error: 'printf_s' was not declared in this scope; did you mean 'printf'?
   34 |                 printf_s("%d: %d\n", n[0], n[0]);
      |                 ^~~~~~~~
      |                 printf
a.cc:38:17: error: 'printf_s' was not declared in this scope; did you mean 'printf'?
   38 |                 printf_s("%d:", n[0]);
      |                 ^~~~~~~~
      |                 printf
Language: C++

#include<iostream>
#include<stdio.h>
#include<math.h>

using namespace std;

int n[2], result[100];

int main()
{
	scanf("%d", &n[0]);

	n[1] = n[0];

	int a = 2;
	int b = 0;

	while (a < sqrt(n[0]))
	{
		if (n[1] % a == 0)
		{
			result[b] = a;
			n[1] /= a;
			b++;
		}
		else
		{
			a++;
		}
	}

	if (result[0] == 0)
	{
		printf("%d: %d\n", n[0], n[0]);
	}
	else
	{
		printf("%d:", n[0]);
		for (int x = 0; x < b - 1; x++)
		{
			printf_s(" %d", result[x]);
		}
		printf(" %d\n", result[b - 1]);
	}

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:41:25: error: 'printf_s' was not declared in this scope; did you mean 'printf'?
   41 |                         printf_s(" %d", result[x]);
      |                         ^~~~~~~~
      |                         printf
Language: C++

#include <iostream>
#include <cmath>
using namespace std;

void solve(int n) {
	while (n != 1) {
		cout << " ";
		for (int i = 2; i <= sqrt(n);i++) {
			if (n%i == 0) {
				n /= i;
				cout << i;
				break;
			}
		}
		cout << n;
	}
}

int main() {
	cin.tie(0); ios::sync_with_stdio(false);
	int n; cin >> n;
	cout << n << ":";
	solve(n);
	cout << endl;
	return 0;

Compiler output:
a.cc: In function 'int main()':
a.cc:25:18: error: expected '}' at end of input
   25 |         return 0;
      |                  ^
a.cc:19:12: note: to match this '{'
   19 | int main() {
      |            ^
Language: C++

#include<stdio.h>
long long int prime[5000000],arr[5000000],primefact[5000000];
long long int size=1,size2=1;

void primenum(int n)
{
    int i,j,k,sqr;
    for(i=1; i<=n; i++)
        arr[i]=1;
    for(i=4; i<=n; i+=2)
        arr[i]=0;
    for(i=3; i*i<=n; i+=2)
    {
        for(j=2; i*j<=n; j++)
        {
            if(arr[i*j]==1)
                arr[i*j]=0;
        }
    }
    for(i=1; i<=n; i++)
    {
        if(arr[i]==1)
        {
            prime[size]=i;
            size++;
        }
    }
    primefactorization(n);

    return;
}
void primefactorization(int n)
{
    int sqr,i,j;
    sqr=sqrt(n);

    for(i=2;prime[i]<=sqr;i++)
    {
        while(n%prime[i]==0)
        {
            n=n/prime[i];
            primefact[size2]=prime[i];
            size2++;
        }
    }
    if(n>1)
    {
      primefact[size2]=n;
      size2++;
    }

return;
}

main()
{
  long long  int i,n;
    scanf("%lld",&n);
    primenum(n);
    printf("%lld:",n);
for(i=1;i<size2;i++)
    printf(" %d",primefact[i]);
    return 0;
}

Compiler output:
a.cc: In function 'void primenum(int)':
a.cc:28:5: error: 'primefactorization' was not declared in this scope
   28 |     primefactorization(n);
      |     ^~~~~~~~~~~~~~~~~~
a.cc: In function 'void primefactorization(int)':
a.cc:35:9: error: 'sqrt' was not declared in this scope; did you mean 'sqr'?
   35 |     sqr=sqrt(n);
      |         ^~~~
      |         sqr
a.cc: At global scope:
a.cc:55:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
   55 | main()
      | ^~~~
Language: C++

#include <iostream>

int main(){
  int n;
  std::cin >> n;
  std::cout << n << ":";
  
  int i = 2;
  int odd = 0;
  while(i<=n){
    if(n%i==0){
        std::cout << " " << i;
        n /= i;
        i = 2;
        odd = 0;
     else{
        if(i==2 && odd==0){
          odd = 1;
          i = 3;
        }
        else if(i>n/2){
        i = n;
        }else{
        if(odd==1) i += 2;
        else       i++;
        }
     }
  }
  std::cout << std::endl;
  
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:6: error: expected '}' before 'else'
   16 |      else{
      |      ^~~~
a.cc:11:15: note: to match this '{'
   11 |     if(n%i==0){
      |               ^
Language: C++

#include <iostream>
using namespace std;
int main() {
  int n;
  cin >> n;

  cout << n << ':';
  for (int i = 2; (i * i <= m) && (n > 1); ) {
    if (n % i == 0) {
      cout << ' ' << i;
      n /= i;
      continue;
    }
    i++;
  }

  cout << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:29: error: 'm' was not declared in this scope
    8 |   for (int i = 2; (i * i <= m) && (n > 1); ) {
      |                             ^
Language: C++

#include<iostream>
#include<algorithm>
#include<vector>
#define F17 510510
#define Rot 35000
using namespace std;

bool P[F17];//2~17??§?????????????????????????????°???

vector<int> v;//????????????????????°?????????
vector<int> p;//19??\???????´???°?????????

int t[7]={2,3,5,7,11,13,17};

void PRE(){
	memset(P,false,F17);
	for(int i=0;i<7;i++){
		for(int j=0;j<F17;j+=t[i]){
			P[j]=true;
		}
	}
	cout<<"PRE1"<<endl;
	for(int i=0;i<F17;i++){
		if(P[i]==false){
			v.push_back(i);
		}
	}
	cout<<"PRE2"<<endl;
	for(int i=19;i<Rot;i+=2){
		if(P[i]==false){
			for(int j=i*i;j<F17;j++){
				P[i]=true;
			}
			p.push_back(i);
		}
	}
	cout<<"PREend"<<endl;
	return;
}

bool IsPrime(int x){
	if(x==1)return false;
	for(int i=0;i<p.size();i++){
		if(p[i]*p[i]>x)break;
		if(x%p[i]==0)return false;
	}
	return true;
}

double Sum=0.0;

void Sum17(){
	for(int i=0;i<7;i++){
		Sum+=1/(t[i]+0.0);
		cout<<i+1<<" "<<t[i]<<" "<<Sum<<endl;
	}
}

void Sum19(){
	int k=0,op=0,cnt=8;
	while(true){
		if(IsPrime(op+v[k])==true){
			Sum+=1/(op+v[k]+0.0);
			if(cnt%1000000==0||cnt==100||cnt==1000||cnt==10000||cnt==100000){
				cout<<cnt<<" "<<op+v[k]<<" "<<Sum;
				getchar();
			}
			cnt++;
		}
		k++;
		if(k==v.size()){
			op+=F17;
			k=0;
		}
	}
}

int main(){
	PRE();
	Sum17();
	Sum19();
	return 0;
}

Compiler output:
a.cc: In function 'void PRE()':
a.cc:16:9: error: 'memset' was not declared in this scope
   16 |         memset(P,false,F17);
      |         ^~~~~~
a.cc:4:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    3 | #include<vector>
  +++ |+#include <cstring>
    4 | #define F17 510510
Language: C++

#include<bits/stdc++.h>
using namespace std;
 
vector <int> p(0);
 
void Prime(int n){
 
  bool flg[(int)sqrt( pow(10,9) ) +1];
  int indx=2;
 
  flg[0]=flg[1]=0;
  for(int i=0; i<sqrt(n)+1; i++)flg[i]=0;
   
 
  for(int i=2;i<sqrt(n)+1;i++){
        if (flg[i]==1) pass;
        else {
            flg[i]==1;
            p.push_back(i);
            for (int j=1;j*i<sqrt(n)+1;j++){
                flg[j*i] == 1;
            }
        }
    }
 
    while(flg[indx]==1 && indx<=sqrt(n))indx++;
 
  }
   
 
}
 
 
int main(){
 
  int n;
 
  cin >> n;
 
  Prime(n);
 
  cout << n << ':';
 
  int i=0;
  while(n!=1 && i<(int)p.size()){
     
    while(n%p[i]==0){
      cout << ' ' << p[i];
      n /= p[i];
    }
 
    i++;
     
  }
 
  if(i==(int)p.size() && n!=1)cout << ' '<<n;
  cout << endl;
 
  return 0;
}

Compiler output:
a.cc: In function 'void Prime(int)':
a.cc:16:24: error: 'pass' was not declared in this scope
   16 |         if (flg[i]==1) pass;
      |                        ^~~~
a.cc: At global scope:
a.cc:31:1: error: expected declaration before '}' token
   31 | }
      | ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
 
vector <int> p(0);
 
void Prime(int n){
 
  bool flg[(int)sqrt( pow(10,9) ) +1];
  int indx=2;
 
  flg[0]=flg[1]=0;
  for(int i=0; i<sqrt(n)+1; i++)flg[i]=0;
   
 
  for(int i=2;i<sqrt(n)+1;i++){
        if (flg[i]==1) {pass;}
        else {
            flg[i]==1;
            p.push_back(i);
            for (int j=1;j*i<sqrt(n)+1;j++){
                flg[j*i] == 1;
            }
        }
    }
 
    while(flg[indx]==1 && indx<=sqrt(n))indx++;
 
  }
   
 
}
 
 
int main(){
 
  int n;
 
  cin >> n;
 
  Prime(n);
 
  cout << n << ':';
 
  int i=0;
  while(n!=1 && i<(int)p.size()){
     
    while(n%p[i]==0){
      cout << ' ' << p[i];
      n /= p[i];
    }
 
    i++;
     
  }
 
  if(i==(int)p.size() && n!=1)cout << ' '<<n;
  cout << endl;
 
  return 0;
}

Compiler output:
a.cc: In function 'void Prime(int)':
a.cc:16:25: error: 'pass' was not declared in this scope
   16 |         if (flg[i]==1) {pass;}
      |                         ^~~~
a.cc: At global scope:
a.cc:31:1: error: expected declaration before '}' token
   31 | }
      | ^
Language: C++

#include<bits/stdc++.h>
# include<iostream>
using namespace std;
 
vector <int> p(0);
 
void Prime(int n){
 
  bool flg[(int)sqrt( pow(10,9) ) +1];
  int indx=2;
 
  flg[0]=flg[1]=0;
  for(int i=0; i<sqrt(n)+1; i++)flg[i]=0;
   
 
  for(int i=2;i<sqrt(n)+1;i++){
        if (flg[i]==1) {pass;}
        else {
            flg[i]==1;
            p.push_back(i);
            for (int j=1;j*i<sqrt(n)+1;j++){
                flg[j*i] == 1;
            }
        }
    }
 
    while(flg[indx]==1 && indx<=sqrt(n))indx++;
 
  }
   
 
}
 
 
int main(){
 
  int n;
 
  cin >> n;
 
  Prime(n);
 
  cout << n << ':';
 
  int i=0;
  while(n!=1 && i<(int)p.size()){
     
    while(n%p[i]==0){
      cout << ' ' << p[i];
      n /= p[i];
    }
 
    i++;
     
  }
 
  if(i==(int)p.size() && n!=1)cout << ' '<<n;
  cout << endl;
 
  return 0;
}

Compiler output:
a.cc: In function 'void Prime(int)':
a.cc:17:25: error: 'pass' was not declared in this scope
   17 |         if (flg[i]==1) {pass;}
      |                         ^~~~
a.cc: At global scope:
a.cc:32:1: error: expected declaration before '}' token
   32 | }
      | ^
Language: C++

#include<bits/stdc++.h>
# include<iostream>
using namespace std;
 
vector <int> p(0);
 
void Prime(int n){
 
  bool flg[(int)sqrt( pow(10,9) ) +1];
  int indx=2;
 
  flg[0]=flg[1]=0;
  for(int i=0; i<sqrt(n)+1; i++)flg[i]=0;
   
 
  for(int i=2;i<sqrt(n)+1;i++){
        if (flg[i]==1) {pass;}
        else {
            flg[i]==1;
            p.push_back(i);
            for (int j=1;j*i<sqrt(n)+1;j++){
                flg[j*i] == 1;
            }
        }
    }
 
    
   
 
}
 
 
int main(){
 
  int n;
 
  cin >> n;
 
  Prime(n);
 
  cout << n << ':';
 
  int i=0;
  while(n!=1 && i<(int)p.size()){
     
    while(n%p[i]==0){
      cout << ' ' << p[i];
      n /= p[i];
    }
 
    i++;
     
  }
 
  if(i==(int)p.size() && n!=1)cout << ' '<<n;
  cout << endl;
 
  return 0;
}

Compiler output:
a.cc: In function 'void Prime(int)':
a.cc:17:25: error: 'pass' was not declared in this scope
   17 |         if (flg[i]==1) {pass;}
      |                         ^~~~
Language: C++

def is_prime?(num)
    $primes = []
    return true if num == 2
    return false if num % 2 == 0
    $primes.each do |n|
        return false if num % n == 0
    end
    $primes << num
    return true
end

n = gets.chomp.to_i
nn = n
sub_n = 2
prime_factors = []
while n > 1
	if n % sub_n == 0
      n /= sub_n
	  prime_factors << sub_n
	  next
	else
      if sub_n == 2
        sub_n += 1
      else
        sub_n += 2
        while !is_prime?(sub_n)
          sub_n += 2
        end
      end
	end
end																								 
str = "#{nn}:"
prime_factors.each do |k|
	str += " #{k}"
end
puts str

Compiler output:
a.cc:1:1: error: 'def' does not name a type
    1 | def is_prime?(num)
      | ^~~
Language: C++

def is_prime?(num)
    $primes = []
    return true if num == 2
    return false if num % 2 == 0
    $primes.each do |n|
        return false if num % n == 0
    end
    $primes << num
    return true
end

n = gets.chomp.to_i
nn = n
sub_n = 2
prime_factors = []
while n > 1
	if n % sub_n == 0
      n /= sub_n
	  prime_factors << sub_n
	  next
	else
      break if sub_n * sub_n > n
      if sub_n == 2
        sub_n += 1
      else
        sub_n += 2
        while !is_prime?(sub_n)
          sub_n += 2
        end
      end
	end
end																								 
str = "#{nn}:"
prime_factors.each do |k|
	str += " #{k}"
end
if n == nn
  str << " #{nn}"
end
puts str

Compiler output:
a.cc:1:1: error: 'def' does not name a type
    1 | def is_prime?(num)
      | ^~~
Language: C++

#include <iostream>
using namespace std;

void primeFactorize(int n) {
    for (int i = 2;i * i <= n; ++i) {
        while (n % i == 0) {
            n /= i;
            cout << ' ' << i;
        }
    }
    if (n != 1) {
        cout << ' ' << n;
    }
}
int main() {
    int n;
    cin >> n;
    cout << n << ':';
    prime_fac(n);
    cout << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:5: error: 'prime_fac' was not declared in this scope
   19 |     prime_fac(n);
      |     ^~~~~~~~~
Language: C++

void Factorization(int v){
	int k = 2;
	while (v != 1){
		if (v % k == 0){
			v = v / k;
			if(v == 1){
				cout<<" "<<k;
				break;
			}
			Factorization(k);
			k = 2;
		}
		else
			k++;
	}
}

int main(){
	int n;
	cin>>n;
	cout<<n<<":";
	Factorization(n);
	return 0;
}

Compiler output:
a.cc: In function 'void Factorization(int)':
a.cc:7:33: error: 'cout' was not declared in this scope
    7 |                                 cout<<" "<<k;
      |                                 ^~~~
a.cc: In function 'int main()':
a.cc:20:9: error: 'cin' was not declared in this scope
   20 |         cin>>n;
      |         ^~~
a.cc:21:9: error: 'cout' was not declared in this scope
   21 |         cout<<n<<":";
      |         ^~~~
Language: C++

#include <iostream>
using namespace std;

void Factorization(int v){
	int k = 2;
	while (v != 1 && k <= sqrt((double) v)){
		if (v % k == 0){
			v = v / k;
			if(v == 1){
				cout<<" "<<k;
				return;
			}
			Factorization(k);
			k = 2;
		}
		else
			k++;
	}
	cout<<" "<<v;
}

int main(){
	int n;
	cin>>n;
	cout<<n<<":";
	Factorization(n);
	cout<<endl;
	return 0;
}

Compiler output:
a.cc: In function 'void Factorization(int)':
a.cc:6:31: error: 'sqrt' was not declared in this scope
    6 |         while (v != 1 && k <= sqrt((double) v)){
      |                               ^~~~
Language: C++

#include <iostream>
#include <math>
using namespace std;

void Factorization(int v){
	int k = 2;
	while (v != 1 && k <= sqrt((double) v)){
		if (v % k == 0){
			v = v / k;
			if(v == 1){
				cout<<" "<<k;
				return;
			}
			Factorization(k);
			k = 2;
		}
		else
			k++;
	}
	cout<<" "<<v;
}

int main(){
	int n;
	cin>>n;
	cout<<n<<":";
	Factorization(n);
	cout<<endl;
	return 0;
}

Compiler output:
a.cc:2:10: fatal error: math: No such file or directory
    2 | #include <math>
      |          ^~~~~~
compilation terminated.
Language: C++

p=lambda x:print(x,end=' ')
m=n=input();p(n+':')
n=int(n)
while n%2==0 and n>3:p(2);n//=2
d=3
while d*d<m and n>d:
 if n%d>0:d+=2
 else:p(d);n//=d
print(n)


Compiler output:
a.cc:1:1: error: 'p' does not name a type
    1 | p=lambda x:print(x,end=' ')
      | ^
a.cc:2:14: error: expected constructor, destructor, or type conversion before '(' token
    2 | m=n=input();p(n+':')
      |              ^
a.cc:4:27: error: 'n' does not name a type
    4 | while n%2==0 and n>3:p(2);n//=2
      |                           ^
a.cc:8:12: error: 'n' does not name a type
    8 |  else:p(d);n//=d
      |            ^
Language: C++

#include <bits/stdc++.h>
using namespace std;

int main(){
    int n = 0;
    int limit;
    scanf("%d",&n);
    printf("%d:",n);
    limit = sqrt(n) ;
    for(int i = 2;i <= n && i <= + 1 limit;){
        if(n%i == 0){
        printf(" %d",i);
         n /=i;
        }
        else i++;
    }
    putchar('\n');
    
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:37: error: expected ';' before 'limit'
   10 |     for(int i = 2;i <= n && i <= + 1 limit;){
      |                                     ^~~~~~
      |                                     ;
a.cc:10:43: error: expected ')' before ';' token
   10 |     for(int i = 2;i <= n && i <= + 1 limit;){
      |        ~                                  ^
      |                                           )
a.cc:10:44: error: expected primary-expression before ')' token
   10 |     for(int i = 2;i <= n && i <= + 1 limit;){
      |                                            ^
Language: C++

#include<bits/stdc++.h> using namespace std; int k,i=2;main(){ cin>>k; cout<<k<<":"; while (i<=sqrt(k)){ if(k%i == 0){ cout<<' '<<i; k/=i; } else{ i++; } } if(k-1){ cout<<' '<<k; } cout<<endl; } 


Compiler output:
a.cc:1:25: warning: extra tokens at end of #include directive
    1 | #include<bits/stdc++.h> using namespace std; int k,i=2;main(){ cin>>k; cout<<k<<":"; while (i<=sqrt(k)){ if(k%i == 0){ cout<<' '<<i; k/=i; } else{ i++; } } if(k-1){ cout<<' '<<k; } cout<<endl; }
      |                         ^~~~~
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
Language: C++

#include<cstdio>
#include<cstring>
#include<iostream>
#include<algorithm>
#include <cmath>
using namespace std;
typedef long long ll;
ll pow(ll x,ll y,ll mod){
	if(y==0)
		return 1;
	ll w=pow(x,y/2,mod);
	ll ans=w*w%mod;
	if(y&1)
		ans*=x%mod;
	return ans;
}

bool vis[50000001];

int main(){

	ios::sync_with_stdio(false);
	int m=sqrt(50000001+0.5);
	memset(vis,0,sizeof(vis))
	for(int i=2;i<=m;i++){
		if(!vis[i])
			for(int j=i*2;j<50000001;j=j+i);
				vis[j]=1;
	}
	int n;
	cin>>n;
	cout<<n<<":";
	while(n!=1){
		for(int i=2;i<=n;i++){
			if(vis[i]==0&&n%i==0){
				cout<<" "<<i;
				n=n/i;
				break;	
			}
		}
	}
	cout<<endl;
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:24:34: error: expected ';' before 'for'
   24 |         memset(vis,0,sizeof(vis))
      |                                  ^
      |                                  ;
   25 |         for(int i=2;i<=m;i++){
      |         ~~~                       
a.cc:25:21: error: 'i' was not declared in this scope
   25 |         for(int i=2;i<=m;i++){
      |                     ^
Language: C++

#include <stdio.h>

int main(void)
{
    int n, i = 2;
    scanf("%d", &n);
    printf("%d: 2 3 3 7", n);
    while(n -1){
        if(1.0 * n / i == n / i){
            printf("%d", i);
            n /= i;
        }else{
            i++
        }
    }
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:13:16: error: expected ';' before '}' token
   13 |             i++
      |                ^
      |                ;
   14 |         }
      |         ~
Language: C++

#include<bits/stdc++.h>
using namespace std;

int s[1000000000]={};

void sosuu(){
  int S[1000000000]={};
  int count=0;
  s[2]=1;
  for(int i=3;i<1000000001;i++){
    S[i]=1;
    for(int h=2;h*h<=i;h++){
      if(S[h]==1 && i%S[h]=0){S[i]=0; break;}
    }}

  for(int i=1;i<1000000001;i++){
    if(S[i]==1){s[count]=i; count++;}
  }
}







int main(){
  sosuu();
  int n;
  cin>>n;
  int b[1000000000]={};

  while(1){
    int i=0,n=0;
    if(s[i]==0 || s[i]>n){break;}
    if(n%s[i]==0){b[n]=s[i]; n++; continue;}
    i++;
  }

  cout<<n<<":";
  for(int i=0;;i++){
    if(b[i]==0){cout<<endl; break;}
    cout<<' '<<b[i];
  }

  return 0;
}



Compiler output:
a.cc: In function 'void sosuu()':
a.cc:13:18: error: lvalue required as left operand of assignment
   13 |       if(S[h]==1 && i%S[h]=0){S[i]=0; break;}
      |          ~~~~~~~~^~~~~~~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;

bool judge(int s){
  for(int i=2;i*i<=s;i++){
    if(s%i!=0 && (i+1)*(i+1)>s){return truth;}
    if(s%i==0){break;}
    }
}


int main(){

  int n;
  cin>>n;
  int b[500000000]={};

  int co=0;
  for(int m=2;m<=n;){
    if(n%m==0){
      if(judge(m)){n=n/m; b[co]==m; co++; continue;}
    }
    m++;
  }


  cout<<n<<':';
  for(int i=0;;i++){
    if(b[i]==0){cout<<endl; break;}
    cout<<' '<<b[i];
  }

 
  return 0;
}



Compiler output:
a.cc: In function 'bool judge(int)':
a.cc:6:40: error: 'truth' was not declared in this scope
    6 |     if(s%i!=0 && (i+1)*(i+1)>s){return truth;}
      |                                        ^~~~~
Language: C++

map< int64_t, int > prime_factor(int64_t n) {
  map< int64_t, int > ret;
  for(int64_t i = 2; i * i <= n; i++) {
    while(n % i == 0) {
      ret[i]++;
      n /= i;
    }
  }
  if(n != 1) ret[n] = 1;
  return ret;
}


Compiler output:
a.cc:1:1: error: 'map' does not name a type
    1 | map< int64_t, int > prime_factor(int64_t n) {
      | ^~~
Language: C++

int main() {
  int N;
  cin >> N;
  cout << N << ":";
  for(auto p : prime_factor(N)) {
    while(p.second--) cout << " " << p.first;
  }
  cout << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:3:3: error: 'cin' was not declared in this scope
    3 |   cin >> N;
      |   ^~~
a.cc:4:3: error: 'cout' was not declared in this scope
    4 |   cout << N << ":";
      |   ^~~~
a.cc:5:16: error: 'prime_factor' was not declared in this scope
    5 |   for(auto p : prime_factor(N)) {
      |                ^~~~~~~~~~~~
a.cc:8:11: error: 'endl' was not declared in this scope
    8 |   cout << endl;
      |           ^~~~
Language: Java

import java.util.*;class Main{public static void main(String[] args){Scanner s=new Scanner(System.in);System.out.println(s.nextBigInteger().modPow(s.nextBigInteger(),BigInteger.valueOf(1000000007)));}}

Compiler output:
Main.java:1: error: cannot find symbol
import java.util.*;class Main{public static void main(String[] args){Scanner s=new Scanner(System.in);System.out.println(s.nextBigInteger().modPow(s.nextBigInteger(),BigInteger.valueOf(1000000007)));}}
                                                                                                                                                                      ^
  symbol:   variable BigInteger
  location: class Main
1 error