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

#include <iostream>
using namespace std;
typedef long long ll;

ll N,inf = 1e9+7;
int main(){
  cin >> N;
  ll ans = 1;
  for(ll 1=1;i<=N;i++){
    ans = (ans*i)%inf;
  }
  cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:10: error: expected unqualified-id before numeric constant
    9 |   for(ll 1=1;i<=N;i++){
      |          ^
a.cc:9:9: error: expected ';' before numeric constant
    9 |   for(ll 1=1;i<=N;i++){
      |         ^~
      |         ;
a.cc:9:10: error: lvalue required as left operand of assignment
    9 |   for(ll 1=1;i<=N;i++){
      |          ^
a.cc:9:14: error: 'i' was not declared in this scope
    9 |   for(ll 1=1;i<=N;i++){
      |              ^
a.cc:9:18: error: expected ')' before ';' token
    9 |   for(ll 1=1;i<=N;i++){
      |      ~           ^
      |                  )
a.cc:9:19: error: 'i' was not declared in this scope
    9 |   for(ll 1=1;i<=N;i++){
      |                   ^
Language: C++

#include <iostream>
using namespace std;
typedef long long ll;

ll N,inf = 1e9+7;
int main(){
  cin >> N;
  ll ans = 1:
  for(ll 1=1;i<=N;i++){
    ans = (ans*i)%inf;
  }
  cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:13: error: expected ',' or ';' before ':' token
    8 |   ll ans = 1:
      |             ^
a.cc:9:14: error: 'i' was not declared in this scope
    9 |   for(ll 1=1;i<=N;i++){
      |              ^
Language: C

#include<cstdio>
int main()
{
	long n,m;
	scanf("%ld",&n);
	m=1;
	for(int i=1;i<=n;i++)
	{
      m*=i;
	}
	if(m==0)
	{
	printf("10e9+7\n");
	}
	else printf("%d\n",m);
}

Compiler output:
main.c:1:9: fatal error: cstdio: No such file or directory
    1 | #include<cstdio>
      |         ^~~~~~~~
compilation terminated.
Language: C

	long n,m;
	scanf("%ld",&n);
	m=1;
	for(int i=1;i<=n;i++)
	{
      m*=i;
	}
	if(m==0)
	{
	printf("10e9+7\n");
	}
	else printf("%d\n",m);
}

Compiler output:
main.c:2:15: error: expected declaration specifiers or '...' before string constant
    2 |         scanf("%ld",&n);
      |               ^~~~~
main.c:2:21: error: expected declaration specifiers or '...' before '&' token
    2 |         scanf("%ld",&n);
      |                     ^
main.c:3:9: warning: data definition has no type or storage class
    3 |         m=1;
      |         ^
main.c:3:9: error: type defaults to 'int' in declaration of 'm' [-Wimplicit-int]
main.c:3:9: error: conflicting types for 'm'; have 'int'
main.c:1:16: note: previous declaration of 'm' with type 'long int'
    1 |         long n,m;
      |                ^
main.c:4:9: error: expected identifier or '(' before 'for'
    4 |         for(int i=1;i<=n;i++)
      |         ^~~
main.c:4:22: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<=' token
    4 |         for(int i=1;i<=n;i++)
      |                      ^~
main.c:4:27: error: expected '=', ',', ';', 'asm' or '__attribute__' before '++' token
    4 |         for(int i=1;i<=n;i++)
      |                           ^~
main.c:8:9: error: expected identifier or '(' before 'if'
    8 |         if(m==0)
      |         ^~
main.c:12:9: error: expected identifier or '(' before 'else'
   12 |         else printf("%d\n",m);
      |         ^~~~
main.c:13:1: error: expected identifier or '(' before '}' token
   13 | }
      | ^
Language: C++

	long n,m;
	scanf("%ld",&n);
	m=1;
	for(int i=1;i<=n;i++)
	{
      m*=i;
	}
	if(m==0)
	{
	printf("10e9+7\n");
	}
	else printf("%d\n",m);
}

Compiler output:
a.cc:2:14: error: expected constructor, destructor, or type conversion before '(' token
    2 |         scanf("%ld",&n);
      |              ^
a.cc:3:9: error: 'm' does not name a type
    3 |         m=1;
      |         ^
a.cc:4:9: error: expected unqualified-id before 'for'
    4 |         for(int i=1;i<=n;i++)
      |         ^~~
a.cc:4:21: error: 'i' does not name a type
    4 |         for(int i=1;i<=n;i++)
      |                     ^
a.cc:4:26: error: 'i' does not name a type
    4 |         for(int i=1;i<=n;i++)
      |                          ^
a.cc:8:9: error: expected unqualified-id before 'if'
    8 |         if(m==0)
      |         ^~
a.cc:12:9: error: expected unqualified-id before 'else'
   12 |         else printf("%d\n",m);
      |         ^~~~
a.cc:13:1: error: expected declaration before '}' token
   13 | }
      | ^
Language: C

#include<stdio.h>
#include<cmath>
int main(){
	int i,j,N;
	int a=1;
	scanf("%d",&N);
	for(i=1;i<=N;i++)
	{
		a=a*i;
	}
	j=pow(10,9)+7;
	a=a%j;
	printf("%d\n",a);
	return 0;
}


Compiler output:
main.c:2:9: fatal error: cmath: No such file or directory
    2 | #include<cmath>
      |         ^~~~~~~
compilation terminated.
Language: C++

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

int main(){
  long long int a;
  cin >>a;
  long long int ans = 1;
  for(int i=1;i<=a;i++){
    ans = ans*i%1000000007;
  }
  cout << ans; <<endl;
}
    

Compiler output:
a.cc: In function 'int main()':
a.cc:11:16: error: expected primary-expression before '<<' token
   11 |   cout << ans; <<endl;
      |                ^~
Language: C

#include<stdio.h>
int main(){
	int N;
	int a=1;
	scanf("%d",&N);
	for(i=1;i<=N;i++)
	{
		a*=1;
	}
	return 0;
}
		

Compiler output:
main.c: In function 'main':
main.c:6:13: error: 'i' undeclared (first use in this function)
    6 |         for(i=1;i<=N;i++)
      |             ^
main.c:6:13: note: each undeclared identifier is reported only once for each function it appears in
Language: C++

#include<stdio.h>
#include<stdlib.h>
int main()
{
	int i,n;
	long  t;
	scanf("%d", &n);
	t = 1;
	i = 2;
		while (i <= n)
		{
			t = t * i;
			i = i + 1;
		}
		if (n<17)
	{
		printf("%ld\n", t);
	}
	else printf("109+7\n");
	system("pause");


Compiler output:
a.cc: In function 'int main()':
a.cc:20:25: error: expected '}' at end of input
   20 |         system("pause");
      |                         ^
a.cc:4:1: note: to match this '{'
    4 | {
      | ^
Language: C++

#include<stdio.h>
#include<stdlib.h>
int main()
{
	float  i, n;
	long float t;
	scanf("%f", &n);
	t = 1, i = 2;
	while (i <= n)
	{
		t = t * i;
		i = i + 1;
	}
	if (t< 10e100)
	{
		printf("%.0lf\n", t);
	}
	else 
	{
		printf("10e9+7\n");
	}
	system("pause");
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:9: error: 'long' specified with 'float'
    6 |         long float t;
      |         ^~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define repr(i,k,n) for(int i = (k); i < (n); i++)
#define rep(i,n) repr(i,0,n)
#define ALL(a) begin(a),end(a)
const ll INF = 114514810;
const ll MOD = 1000000007;
typedef vector<int> vi;
typedef vector<string> vs;
typedef long long ll;
int ctoi(const char c){
    switch(c){
    case '0': return 0;
    case '1': return 1;
    case '2': return 2;
    case '3': return 3;
    case '4': return 4;
    case '5': return 5;
    case '6': return 6;
    case '7': return 7;
    case '8': return 8;
    case '9': return 9;
  }
}
int main(){
	cin.tie(0);
	ios::sync_with_stdio(false);
	ll N,pow=1;
	cin >> N;
	rep(i,N){
		pow = pow*i%MOD;
	}
	cout << pow << endl;
}


Compiler output:
a.cc:6:7: error: 'll' does not name a type
    6 | const ll INF = 114514810;
      |       ^~
a.cc:7:7: error: 'll' does not name a type
    7 | const ll MOD = 1000000007;
      |       ^~
a.cc: In function 'int main()':
a.cc:31:29: error: 'MOD' was not declared in this scope
   31 |                 pow = pow*i%MOD;
      |                             ^~~
a.cc: In function 'int ctoi(char)':
a.cc:24:1: warning: control reaches end of non-void function [-Wreturn-type]
   24 | }
      | ^
Language: C

#include <stdio.h>

int main()
{
	int N,M=1;
	//1<=N<=10^5
	scanf("%d",&N);
	for(int i=1;i<=N;i++){
		
		M*=i;
	}
	
	
		printf("%d",M）;
	return 0;
 } 

Compiler output:
main.c: In function 'main':
main.c:14:29: error: 'M\U0000ff09' undeclared (first use in this function)
   14 |                 printf("%d",M）;
      |                             ^~~
main.c:14:29: note: each undeclared identifier is reported only once for each function it appears in
main.c:14:32: error: expected ')' before ';' token
   14 |                 printf("%d",M）;
      |                       ~        ^
      |                                )
main.c:15:18: error: expected ';' before '}' token
   15 |         return 0;
      |                  ^
      |                  ;
   16 |  }
      |  ~
Language: C

#include <stdio.h>
#include<iostream>
using namespace std;
int main()
{
	int N,M=1;
	//1<=N<=10^5
	scanf("%d",&N);
	for(int i=1;i<=N;i++){
		
		M*=i;
	}
	
	
		cout<<M<<" ";
	return 0;
 } 

Compiler output:
main.c:2:9: fatal error: iostream: No such file or directory
    2 | #include<iostream>
      |         ^~~~~~~~~~
compilation terminated.
Language: C++

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

int main()
{
    ll n,ans=1;
    cin>>n;
    for(int i=1;i<=n;i++){
        ans*=i;
        ans%=1000000007;
    }
    cout<<ans<<endl;

    
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:5: error: 'll' was not declared in this scope
    7 |     ll n,ans=1;
      |     ^~
a.cc:8:10: error: 'n' was not declared in this scope; did you mean 'yn'?
    8 |     cin>>n;
      |          ^
      |          yn
a.cc:10:9: error: 'ans' was not declared in this scope; did you mean 'abs'?
   10 |         ans*=i;
      |         ^~~
      |         abs
a.cc:13:11: error: 'ans' was not declared in this scope; did you mean 'abs'?
   13 |     cout<<ans<<endl;
      |           ^~~
      |           abs
Language: C

include <stdio.h>

char s[200000];

int main() {

	long long int i;
	long long int n;//トレーニング回数//
	long long int power;
	long long int amari;

	scanf("%lld", &n);

	power = 1;

	for (i = 1; i <= n; i++) {
		power = power * i;
	}

	amari = power % 1000000007;

	printf("%lld\n", amari);



	return 0;
}


Compiler output:
main.c:1:9: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
    1 | include <stdio.h>
      |         ^
main.c: In function 'main':
main.c:12:9: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
   12 |         scanf("%lld", &n);
      |         ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | include <stdio.h>
main.c:12:9: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
   12 |         scanf("%lld", &n);
      |         ^~~~~
main.c:12:9: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:22:9: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
   22 |         printf("%lld\n", amari);
      |         ^~~~~~
main.c:22:9: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:22:9: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:22:9: note: include '<stdio.h>' or provide a declaration of 'printf'
Language: C++

#include <bits/std.c++.h>
#define rep(i,a,n) for(int (i) = (a);(i) < (n);(i)++)
typedef long long ll;

using namespace std;

int main(){
	ll n,memo = 0;
	
	cin >> n;
	
	rep(i,1,n+1){
		memo += i;	
	}
	
	cout << memo % (pow(10,9)+7) << endl;
	return 0;
}

Compiler output:
a.cc:1:10: fatal error: bits/std.c++.h: No such file or directory
    1 | #include <bits/std.c++.h>
      |          ^~~~~~~~~~~~~~~~
compilation terminated.
Language: C++

#include <bits/stdc++.h>
#define REP(i,n) for(int i=0;i<(n);i++)
const int MOD=(int)1e9+7;
using namespace std;
int main(){
    int n;
    cin>>n;
    long long ans=1;
    for(int i = 1; i <= n; ++i){
        ans*=i;
        ans%=MOD
}
cout<<ans<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:17: error: expected ';' before '}' token
   11 |         ans%=MOD
      |                 ^
      |                 ;
   12 | }
      | ~
Language: C++

#include <bits/stdc++.h>
#define REP(i,n) for(int i=0;i<(n);i++)
const int MOD=(int)1e9+7;
using namespace std;
int main(){
    int n;
    cin>>n;
    long long ans=1;
    for(int i = 1; i <= n; ++i){
        ans*=i;
        ans%=MOD
}
cout<<ans<<endl;

Compiler output:
a.cc: In function 'int main()':
a.cc:11:17: error: expected ';' before '}' token
   11 |         ans%=MOD
      |                 ^
      |                 ;
   12 | }
      | ~                
a.cc:13:17: error: expected '}' at end of input
   13 | cout<<ans<<endl;
      |                 ^
a.cc:5:11: note: to match this '{'
    5 | int main(){
      |           ^
Language: C++

#include <bits/stdc++.h>
#define REP(i,n) for(int i=0;i<(n);i++)
const int MOD=(int)1e9+7;
using namespace std;
int main(){
    int n;
    cin>>n;
    long long ans=1;
    for(int i = 1; i <= n; ++i){
        ams*=i;
        ans%=MOD
}
cout<<ans<<endl;

Compiler output:
a.cc: In function 'int main()':
a.cc:10:9: error: 'ams' was not declared in this scope; did you mean 'ans'?
   10 |         ams*=i;
      |         ^~~
      |         ans
a.cc:11:17: error: expected ';' before '}' token
   11 |         ans%=MOD
      |                 ^
      |                 ;
   12 | }
      | ~                
a.cc:13:17: error: expected '}' at end of input
   13 | cout<<ans<<endl;
      |                 ^
a.cc:5:11: note: to match this '{'
    5 | int main(){
      |           ^
Language: C++

#include <bits/stdc++.h>
#define REP(i,n) for(int i=0;i<(n);i++)
const int MOD=(int)1e9+7;
using namespace std;
int main(){
    int n;
    cin>>n;
    long long ans=1;
    for(int i = 1; i <= N; ++i){
        ams*=i;
        ans%=MOD
}
cout<<ans<<endl;

Compiler output:
a.cc: In function 'int main()':
a.cc:9:25: error: 'N' was not declared in this scope
    9 |     for(int i = 1; i <= N; ++i){
      |                         ^
a.cc:10:9: error: 'ams' was not declared in this scope; did you mean 'ans'?
   10 |         ams*=i;
      |         ^~~
      |         ans
a.cc:11:17: error: expected ';' before '}' token
   11 |         ans%=MOD
      |                 ^
      |                 ;
   12 | }
      | ~                
a.cc:13:17: error: expected '}' at end of input
   13 | cout<<ans<<endl;
      |                 ^
a.cc:5:11: note: to match this '{'
    5 | int main(){
      |           ^
Language: C++

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

int main(){
    int N,ans=1;
    const int MOD = 1e9+7;
    cin>>N;
    for(int i=1;i<N;++i){
        ans *= i;
        ans %= MDO;
    }
    cout<<ans<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:16: error: 'MDO' was not declared in this scope; did you mean 'MOD'?
   10 |         ans %= MDO;
      |                ^~~
      |                MOD
Language: C++

#include <iostream>
using namespace std;

int main() {
	int n, i = 1, power = 1;
	cin >> n;
	while (i <= n) {
	    power = power * i;
	    if (power >= 1000000007) power = power % 1000000007;
	    i++
	}
	cout << power;
	return 0;
}


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

#include <iostream>
#include <string>
#include <vector>
#include <algorithm>

using namespace std;

int main(){
    int N;
    cin >> N;
    int res = 1;
    for (int i = 1; i <= N; ++i) {
        res = i * res % (1e9 + 7);
    }

    cout << res << endl;

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:23: error: invalid operands of types 'int' and 'double' to binary 'operator%'
   13 |         res = i * res % (1e9 + 7);
      |               ~~~~~~~ ^ ~~~~~~~~~
      |                 |            |
      |                 int          double
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
    int a,b=1;
    cin>>a;
    for(int i=2;i<=a;i++){
        b*=i;
        b=b%1000000007
    }
    cout<<b<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:23: error: expected ';' before '}' token
    8 |         b=b%1000000007
      |                       ^
      |                       ;
    9 |     }
      |     ~
Language: C++

#include <iostream>
#include <fstream>
#include <algorithm>
#include <string>
#include <vector>
#include <cmath>

#include <boost/multiprecision/cpp_int.hpp>

using namespace std;
using namespace boost::multiprecison;

cpp_int power(int p, int q){
    cpp_int ret = p;
    for(int i=1;i<q;i++){
        ret *= p;
    }
    return ret;
}

int main(void){
	int n = 0;
    cin >> n;
    cpp_int pow = 1;
    for(int i=1;i<=n;i++){
        pow *= i;
    }
    cout << pow % (7 + power(10,9)) << endl;
	return 0;
}

Compiler output:
a.cc:8:10: fatal error: boost/multiprecision/cpp_int.hpp: No such file or directory
    8 | #include <boost/multiprecision/cpp_int.hpp>
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
Language: C++

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

int main(){
  long int i,array[200001]={},a,b=1,c;
  string s;
  cin>>a;
  
  for(i=1;i<=a;i++){
    b*=i;
    b%=1000000007
    }
  cout<<b<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:18: error: expected ';' before '}' token
   11 |     b%=1000000007
      |                  ^
      |                  ;
   12 |     }
      |     ~
Language: C++

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

int main(){
  long int i,array[200001]={},a,b=1,c;
  string s;
  cin>>a;
  
  for(i=1;i<=a;i++){
    b*=i;
    b%=pow(10,9)+7;
    }
  cout<<b<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:6: error: invalid operands of types 'long int' and '__gnu_cxx::__promote<double>::__type' {aka 'double'} to binary 'operator%'
   11 |     b%=pow(10,9)+7;
      |     ~^~~~~~~~~~~~~
a.cc:11:6: note:   in evaluation of 'operator%=(long int, __gnu_cxx::__promote<double>::__type {aka double})'
Language: C++

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

int main(){
  long i,array[200001]={},a,b=1,c;
  string s;
  cin>>a;
  
  for(i=1;i<=a;i++){
    b*=i;
    b%=pow(10,9)+7;
    }
  cout<<b<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:6: error: invalid operands of types 'long int' and '__gnu_cxx::__promote<double>::__type' {aka 'double'} to binary 'operator%'
   11 |     b%=pow(10,9)+7;
      |     ~^~~~~~~~~~~~~
a.cc:11:6: note:   in evaluation of 'operator%=(long int, __gnu_cxx::__promote<double>::__type {aka double})'
Language: C++

#include<iostream>
#include<algorithm>
#include<vector>
#include<string>
using namespace std;
typedef long long lng;
#define FOR(i,a,b) for(int i=(a); i<=(b); ++i)
#define FORD(i,b,a) for(int i=(b); i>=(a); --i)
#define REP(i,n) FOR(i,0,n-1)
#define ALL(a) (a).begin(), (a).end()
#define UNIQUE(a) a.erase(unique(ALL(a)), a.end()) //NOTE: <a> must be sorted in advance

lng power(lng b, lng n) {lng sol=1; while(n>0) {if(n&1) {sol=sol*b;} n>>=1; b*= b;} return sol;} //calculate b^n

const int MOD = 1000000007; //10^9+7


/*********** variables ************/
int N
/**********************************/

int main() {
    cin.tie(0);
    ios::sync_with_stdio(false);
    cin >> N;
    lng now = 1;
    FOR(i, 1, N) {
        now *= i;
        now %= MOD;
    }
    cout << now << endl;
}


Compiler output:
a.cc:22:1: error: expected initializer before 'int'
   22 | int main() {
      | ^~~
Language: C++

#include <iostream>

using namespace std;

int main(){
  int p = 1;
  int N;
  cin >> N;
  
  for(int i = 1; i <= N; i++){
    p *= i;
    p %= e+9 + 7;
  }

  cout << p << endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:10: error: 'e' was not declared in this scope
   12 |     p %= e+9 + 7;
      |          ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
int N;
int main(){
    cin>>N;
    ll cunt=1;
    for(int i=1;i<=N;i++){
        cunt*=i;
        cunt%=(1000000000ll+7);
    }
    cout<<cunt<<"\n";

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:5: error: 'll' was not declared in this scope
    6 |     ll cunt=1;
      |     ^~
a.cc:8:9: error: 'cunt' was not declared in this scope
    8 |         cunt*=i;
      |         ^~~~
a.cc:11:11: error: 'cunt' was not declared in this scope
   11 |     cout<<cunt<<"\n";
      |           ^~~~
Language: C++

#include <iostream>
#include <algorithm>
#include <cmath>
#include <limits>
#include <vector>
using namespace std;
using ll=long long
 
int main( void) {
  int N=0;
  ll wa=1e9+7;
  ll power=1;
  cin >> N;
  for (int i=1; i<=N; i++){
    power=power*i;
  }
  power=power%wa;
  cout << power;
  
}

Compiler output:
a.cc:9:4: error: expected ';' before 'main'
    9 | int main( void) {
      |    ^~~~~
      |    ;
Language: C++

#include <iostream>
#include <algorithm>
#include <cmath>
#include <limits>
#include <vector>
using namespace std;

int main( void) {
  int N=0;
  long wa=1e9+7
  long power=1;
  cin >> N;
  for (int i=1; i<=N; i++){
    power=(power*i)%wa;
  }
  power=power%wa;
  cout << power;
  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:3: error: expected ',' or ';' before 'long'
   11 |   long power=1;
      |   ^~~~
a.cc:14:5: error: 'power' was not declared in this scope
   14 |     power=(power*i)%wa;
      |     ^~~~~
a.cc:16:3: error: 'power' was not declared in this scope
   16 |   power=power%wa;
      |   ^~~~~
Language: C++

#include <iostream>
#include <algorithm>
#include <cmath>
#include <limits>
#include <vector>
#define delta 10**9+7
using namespace std;

int main( void) {
  int N=0;
  int power=1;
  cin >> N;
  for (int i=1; i<=N; i++){
    power=(power*i);
    power=power%delta;
  }
  power=power%delta;
  cout << power;
  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:18: error: invalid type argument of unary '*' (have 'int')
    6 | #define delta 10**9+7
      |                  ^~
a.cc:15:17: note: in expansion of macro 'delta'
   15 |     power=power%delta;
      |                 ^~~~~
a.cc:6:18: error: invalid type argument of unary '*' (have 'int')
    6 | #define delta 10**9+7
      |                  ^~
a.cc:17:15: note: in expansion of macro 'delta'
   17 |   power=power%delta;
      |               ^~~~~
Language: C++

#include<iostream>
using namespace std;
int main(){
    int n;
    cin>>n;
    int ans=1;
    for(int i=1;i<=n;i++) ans=(ans*i)%1000000007

    cout<<ans;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:49: error: expected ';' before 'cout'
    7 |     for(int i=1;i<=n;i++) ans=(ans*i)%1000000007
      |                                                 ^
      |                                                 ;
    8 | 
    9 |     cout<<ans;
      |     ~~~~
Language: C++

#include<iostream>
using namespace std;

int main(){
  int n;
  cin >> n;
  int p = 1,;
  for(int i=1; n >= i; i++){
    p = (p*i)%1000000007;
  }
  cout << p << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:13: error: expected unqualified-id before ';' token
    7 |   int p = 1,;
      |             ^
Language: C++

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

	unsigned long power = 1;
	unsigned long div = std::pow(10.0, 9) + 7;
	for (unsigned long i = 1; i <= N; ++i) power = i * power % div;

	cout << power << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:34: error: 'pow' is not a member of 'std'
    8 |         unsigned long div = std::pow(10.0, 9) + 7;
      |                                  ^~~
Language: C++

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

	unsigned long power = 1;
	unsigned long div = pow(10.0, 9) + 7;
	for (unsigned long i = 1; i <= N; ++i) power = i * power % div;

	cout << power << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:29: error: 'pow' was not declared in this scope; did you mean 'power'?
    8 |         unsigned long div = pow(10.0, 9) + 7;
      |                             ^~~
      |                             power
Language: C++

#include <iostream>
using namespace std;

int main(){
  int N;
  cin >> N;
  int total;
  for(int i = 1; i <= N; i++){
     total = total*i
  }
  
  int ans = total%(10^9+7)
    cout << ans << endl;
}
  

Compiler output:
a.cc: In function 'int main()':
a.cc:9:21: error: expected ';' before '}' token
    9 |      total = total*i
      |                     ^
      |                     ;
   10 |   }
      |   ~                  
a.cc:13:5: error: expected ',' or ';' before 'cout'
   13 |     cout << ans << endl;
      |     ^~~~
Language: C++

use std::env;
use std::io::*;
use std::str::*;
use std::mem;
use std::collections::HashMap;

fn read<T: FromStr>() -> T {
    let stdin = stdin();
    let s = stdin.bytes().map(|c| c.unwrap() as char)
        .skip_while(|c| c.is_whitespace())
        .take_while(|c| !c.is_whitespace())
        .collect::<String>();
    s.parse::<T>().ok().unwrap()
}
fn read_char() -> char {
    let c = read::<String>();
    let c = c.chars().collect::<Vec<char>>();
    c[0]
}
fn read_String_Vec() -> Vec<char> {
    let S = read::<String>();
    S.chars().collect::<Vec<char>>()
}

fn vecchar_to_String(Vs: Vec<char>) -> String {
    let mut S = String::new();
    for i in 0..Vs.len() {
        S.push(Vs[i]);
    }
    S
}

/*
A : 65
Z : 90
a : 97
z : 122
*/

/*
let N = read::<i32>();
let S = read::<String>();
let S = read_String_Vec();
let C = read_char();
*/

/*
 .to_string() : * -> String
 &*S          : String -> &str
*/

fn main() {
    // main の引数
    /*
        引数なしのときargs.len() = 1;
    */
    let args: Vec<String> = env::args().collect();

    let N = read::<i64>();
    let mut mpl = 1;
    for i in 0..N {
        mpl = (mpl * (i+1)) % 1000000007;
    }
    println!("{}", mpl%1000000007);

}


Compiler output:
a.cc:27:14: error: too many decimal points in number
   27 |     for i in 0..Vs.len() {
      |              ^~~~~~~~~
a.cc:61:14: error: too many decimal points in number
   61 |     for i in 0..N {
      |              ^~~~
a.cc:1:1: error: 'use' does not name a type
    1 | use std::env;
      | ^~~
a.cc:2:1: error: 'use' does not name a type
    2 | use std::io::*;
      | ^~~
a.cc:3:1: error: 'use' does not name a type
    3 | use std::str::*;
      | ^~~
a.cc:4:1: error: 'use' does not name a type
    4 | use std::mem;
      | ^~~
a.cc:5:1: error: 'use' does not name a type
    5 | use std::collections::HashMap;
      | ^~~
a.cc:7:1: error: 'fn' does not name a type
    7 | fn read<T: FromStr>() -> T {
      | ^~
a.cc:15:1: error: 'fn' does not name a type
   15 | fn read_char() -> char {
      | ^~
a.cc:20:1: error: 'fn' does not name a type
   20 | fn read_String_Vec() -> Vec<char> {
      | ^~
a.cc:25:1: error: 'fn' does not name a type
   25 | fn vecchar_to_String(Vs: Vec<char>) -> String {
      | ^~
a.cc:52:1: error: 'fn' does not name a type
   52 | fn main() {
      | ^~
Language: Java

import java.util.*;
public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int c = sc.nextInt();
		long a=1;
		long x=1;
		for(int i=0;i<9;i++) {
			x *=10;
		}
		for(int i=1;i<=c;i++) {
			a = a*i;
			a =  a % (x+7);
		}
		System.out.print(a);
		sc.close();
	}
}
import java.util.*;
public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int c = sc.nextInt();
		long a=1;
		long x=1;
		for(int i=0;i<9;i++) {
			x *=10;
		}
		for(int i=1;i<=c;i++) {
			a = a*i;
			a =  a % (x+7);
		}
		System.out.print(a);
		sc.close();
	}
}


Compiler output:
Main.java:19: error: class, interface, enum, or record expected
import java.util.*;
^
1 error
Language: C++

//#include "bits\stdc++.h"
#include <iostream>
#include <vector>
#include <string>
#include <algorithm>

using namespace std;
typedef long long LL;

int main()
{
    int n;

    long int a, p = 1;

    cin >> n;

    for (int i = 0; i < n; ++i)
    {
        p *= (i + 1);
    }

    a = pow(10, 9);

    cout << p  % (a + 7)<< endl;

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:23:9: error: 'pow' was not declared in this scope
   23 |     a = pow(10, 9);
      |         ^~~
Language: C++

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

const int MOD = 1000000007;
int main() {
	int N;
	cin >> N;
	int64_t power = 1;
	for (int i = 2;i <= N;i ++) power = power * i % MOD;
	cout << power;
	return 0;
}
/*
31536000のコメント解説欄
ここテンプレで用意してるから、A問題とかだとこの先空欄の危険あり

総積のmodはmodの総積に等しいので、毎回modすればいい
ちなみに、10^9+7は素数なので、これを利用した定理(逆元をフェルマーの小定理から求める等)には注意ね
*/

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

#include<iostream>
using namespace std;
const int mod=10e9+7;
typedef long long ll;

int main(){
	int N;
  	ll ans=1;
  	cin>>N;
 	for(int i=1;i<=N,i++) ans*=i;
  	cout<<(N%mod)<<endl;
}

Compiler output:
a.cc:3:19: warning: overflow in conversion from 'double' to 'int' changes value from '1.0000000007e+10' to '2147483647' [-Woverflow]
    3 | const int mod=10e9+7;
      |               ~~~~^~
a.cc: In function 'int main()':
a.cc:10:29: error: expected ';' before ')' token
   10 |         for(int i=1;i<=N,i++) ans*=i;
      |                             ^
      |                             ;
Language: C++

#include<iostream>
const int mod=10e9+7;
typedef long long ll;

int main(){
	int N;
  	ll ans=1;
  	cin>>N;
 	for(int i=1;i<=N,i++) ans*=i;
  	cout<<(N%mod)<<endl;
}

Compiler output:
a.cc:2:19: warning: overflow in conversion from 'double' to 'int' changes value from '1.0000000007e+10' to '2147483647' [-Woverflow]
    2 | const int mod=10e9+7;
      |               ~~~~^~
a.cc: In function 'int main()':
a.cc:8:9: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    8 |         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:9:29: error: expected ';' before ')' token
    9 |         for(int i=1;i<=N,i++) ans*=i;
      |                             ^
      |                             ;
a.cc:10:9: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   10 |         cout<<(N%mod)<<endl;
      |         ^~~~
      |         std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:10:24: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   10 |         cout<<(N%mod)<<endl;
      |                        ^~~~
      |                        std::endl
In file included from /usr/include/c++/14/iostream:41:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: C++

#include "bits/stdc++.h"
using namespace std;
typedef long long ll;

void mul_mod(ll& a, ll b){
	a *= b;
	a %= MOD;
}

int main(void){
	ll i,n,ans=1ll;
	cin >> n;
	for(i=1ll; i<=n; ++i){
		mul_mod(ans,i);
	}
	cout << ans << endl;
	return 0;
}

Compiler output:
a.cc: In function 'void mul_mod(ll&, ll)':
a.cc:7:14: error: 'MOD' was not declared in this scope
    7 |         a %= MOD;
      |              ^~~
Language: C++

#include "bits/stdc++.h"
using namespace std;
typedef long long ll;
int main(void){
	ll i,n,ans=1ll;
	cin >> n;
	for(i=1ll; i<=n; ++i){
		mul_mod(ans,i);
	}
	cout << ans << endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:17: error: 'mul_mod' was not declared in this scope
    8 |                 mul_mod(ans,i);
      |                 ^~~~~~~
Language: C++

        #include<iostream>
        #include<vector>
        #define REP(m,n) for(int i=m;i<n;i++)
        using namespace std;
        int main(){
         long long int pow=1,N;
         cin>>N;
         for(i=0;i<N;i++){
         pow=pow*(i+1);
         }
         cout<<pow%1000000007<<endl;
         return 0;
        }

Compiler output:
a.cc: In function 'int main()':
a.cc:8:14: error: 'i' was not declared in this scope
    8 |          for(i=0;i<N;i++){
      |              ^
Language: C++

#include<iostream>
#include<vector>
#define REP(m,n) for(int i=m;i<n;i++)
using namespace std;
int main(){
 long long int pow=1,N;
 cin>>https://abc055.contest.atcoder.jp/tasks/abc055_bN;
 REP(0,N) pow=pow*i;
 cout<<pow%1000000007<<endl;
 return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:7: error: 'https' was not declared in this scope
    7 |  cin>>https://abc055.contest.atcoder.jp/tasks/abc055_bN;
      |       ^~~~~
a.cc:3:30: error: 'i' was not declared in this scope
    3 | #define REP(m,n) for(int i=m;i<n;i++)
      |                              ^
a.cc:8:2: note: in expansion of macro 'REP'
    8 |  REP(0,N) pow=pow*i;
      |  ^~~
Language: C++

#include <algorithm>
#include <cstdio>
#include <functional>
#include <iostream>
#include <cfloat>
#include <climits>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <time.h>
#include <vector>
//#include <random>
//#include <unordered_set>
#include <complex>
using namespace std;                     //设10的9次方+7=a； 
int main()                              //算n的阶乘，每当n的阶乘超过a时，都把n的阶乘%一下a，每次%掉的数肯定是a的整数倍，就算每次%掉的数还乘了下一个数， 
{                                      //甚至一直乘下去，最后总要%，也会一起%掉的，为避免溢出，所以如此做；每次%不掉的部分最后还是一样留下来 
    long long n,i,ans=1;              //
    cin>>n;                          //                      
    for(i=2;i<=n;i++) //--------------
    {
        ans*=i;
        if(ans>cnt) ans%=1000000007;
    }
    cout<<ans;
    system ("pause"); 
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:29:16: error: 'cnt' was not declared in this scope; did you mean 'int'?
   29 |         if(ans>cnt) ans%=1000000007;
      |                ^~~
      |                int
Language: C++

#include <iostream>
#include <string>
#include <string.h>
#include <map>
#include <set>
#include <vector>
#include <stdio.h>
#include <math.h>
#include <algorithm>
#include <queue>
#include <cmath>
#include <cstdio>
using namespace std;
int main(){
int n;
cin>>n;
int ans=1;
for(int i=1;i<=n;i++)
ans*=i;
cout<<ans%1000000007
system("pause");
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:20:21: error: expected ';' before 'system'
   20 | cout<<ans%1000000007
      |                     ^
      |                     ;
   21 | system("pause");
      | ~~~~~~
Language: C++

#include <iostream>
#include<string>
#include <cmath> 
using namespace std;   
int main()  
{ 
     long double ans=1,n;
    cin>>n;
    for(int i=1;i<=n;i++){
    ans*=i;
    ans%=1000000007;}
    cout<<ans<<endl;
    system("pause");
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:8: error: invalid operands of types 'long double' and 'int' to binary 'operator%'
   11 |     ans%=1000000007;}
      |     ~~~^~~~~~~~~~~~
a.cc:11:8: note:   in evaluation of 'operator%=(long double, int)'
Language: C++

#include <iostream>
#include<string>
#include <cmath> 
using namespace std;   
int main()  
{ 
     long double ans=1,n,a=1;
    cin>>n;
    for(int i=1;i<=n;i++){
    ans*=a;
    a++;}
    ans%=1000000007;
    cout<<ans<<endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:8: error: invalid operands of types 'long double' and 'int' to binary 'operator%'
   12 |     ans%=1000000007;
      |     ~~~^~~~~~~~~~~~
a.cc:12:8: note:   in evaluation of 'operator%=(long double, int)'
Language: C++

#include<string>
#include<string.h>
#include<map>
#include<set>
#include<vector>
#include<stdio.h>
#include<math.h>
#include<iostream>
#include<algorithm>
#include<queue>


using namespace std;


int main()
{
    long long n,m;
    cin>>n>>m;
    if(n*2=m)
    cout<<n;
    if(n*2>m)
    cout<<m/2;
    if(n*2<m)
    cout<<n+(m-(n*2))/4;

    return 0;
}    
    
     

Compiler output:
a.cc: In function 'int main()':
a.cc:20:9: error: lvalue required as left operand of assignment
   20 |     if(n*2=m)
      |        ~^~
Language: C++

#include<iostream>
usin namespace std;
int main()
{
int n;
const long long big=1000000007;
cin>>n;
long long ans=n;
for(int i=1;i<=n;i++)
ans*=i;
if(ans>big)
cout<<ans/big;
else
cout<<ans;

Compiler output:
a.cc:2:1: error: 'usin' does not name a type
    2 | usin namespace std;
      | ^~~~
a.cc: In function 'int main()':
a.cc:7:1: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    7 | 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:12:1: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   12 | cout<<ans/big;
      | ^~~~
      | std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:14:1: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   14 | cout<<ans;
      | ^~~~
      | std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:14:11: error: expected '}' at end of input
   14 | cout<<ans;
      |           ^
a.cc:4:1: note: to match this '{'
    4 | {
      | ^
Language: C++

#include <iostream>
#include <string>
int main() {
	long long S,A=1;
	std::cin >> S;
	for (int i = 1; i <= S; i++){
		A=A*i;
		A=A % 1000000007;
	}
	std::cout << A%1000000007 << std::endl;


Compiler output:
a.cc: In function 'int main()':
a.cc:10:48: error: expected '}' at end of input
   10 |         std::cout << A%1000000007 << std::endl;
      |                                                ^
a.cc:3:12: note: to match this '{'
    3 | int main() {
      |            ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
struct edge {int /*from,*/to,cost;};
typedef long long ll;
typedef pair<int,int> P;
typedef pair<pair<int,int>,int> PP;
typedef vector<int> VI;
typedef vector<long long int> VL;
typedef vector<edge> VE;
static const int MOD = 1000000007;
static const int INF = 2147483647;
//static const long long INF = 9223372000000000000;
//static const long long INF = 9223372000000000000/2;
//static const int INF = 1000010000;
//int dx4[4] = {0,1,0,-1}, dy4[4] = {-1,0,1,0};
//int dx5[5] = {-1,0,0,0,1}, dy5[5] = {0,-1,0,1,0};
//int dx8[8] = {-1,0,1,1,1,0,-1,-1}, dy8[8] = {1,1,1,0,-1,-1,-1,0};
//int dx9[9] = {-1,0,1,1,1,0,-1,-1,0}, dy9[9] = {1,1,1,0,-1,-1,-1,0,0};
#define pb push_back
#define mp make_pair
#define all(x) (x).begin(),(x).end()
#define fi first
#define se second
#define np next_permutation
#define pq priority_queue
#define SZ(a) int((a).size())
#define LEN(a) int((a).length())
#define MAX(a,b,c) max((a),max((b),(c)))
#define MIN(a,b,c) min((a),min((b),(c)))
#define SORT(c) sort((c).begin(),(c).end())
#define FOR(i,a,b) for(int i=(a);i<(b);i++)
#define REP(i,x) for(int i=0;i<(int)(x);i++)
#define REP1(i,x) for(int i=1;i<=(int)(x);i++)
#define RREP(i,x) for(int i=((int)(x)-1);i>=0;i--)
#define RREP1(i,x) for(int i=((int)(x));i>0;i--)
//#define int ll

int fact[114514];

void fact(){
    fact[0] = fact[1] = 1;
    REP1(i,114513){
        fact[i] = (fact[i-1] * i) % MOD;
    }
}

signed main(){
    int n;
    f();
    printf("%d\n",fact[n]);
    return 0;
}

Compiler output:
a.cc:41:11: error: 'void fact()' redeclared as different kind of entity
   41 | void fact(){
      |           ^
a.cc:39:5: note: previous declaration 'int fact [114514]'
   39 | int fact[114514];
      |     ^~~~
a.cc: In function 'int main()':
a.cc:50:5: error: 'f' was not declared in this scope
   50 |     f();
      |     ^
Language: C++

#include <cstdio>
#include <algorithm>
#include <cstring>
#include <cmath>
#include <iostream>
using namespace std;
int main(){
  int N;
  scanf("%d",&N);
  long long p=1;
  for(int i=1;i<=N;i++){
    p=p*i
  }
  p=p%1000000007;
  printf("%lld\n",p);
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:10: error: expected ';' before '}' token
   12 |     p=p*i
      |          ^
      |          ;
   13 |   }
      |   ~
Language: C++

#include <iostream>
int N;
int main(){
long long p = 1;
std::cin >> N;
for(int i = 1; i <= N; ++i) sum = sum * i % 1000000007;
std::cout << sum << std::endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:29: error: 'sum' was not declared in this scope
    6 | for(int i = 1; i <= N; ++i) sum = sum * i % 1000000007;
      |                             ^~~
a.cc:7:14: error: 'sum' was not declared in this scope
    7 | std::cout << sum << std::endl;
      |              ^~~
Language: C++

import java.util.Scanner;

public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    long N = sc.nextInt();
    long power = 1;
    for(int a=1;a<=N;a++){
      power = (power*a)%1000000007;
    }
    System.out.println(power);
  }
}

Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import java.util.Scanner;
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:3:1: error: expected unqualified-id before 'public'
    3 | public class Main{
      | ^~~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define FOR(i, n) for(int i = 0; i < (n); i++)
#define MEM(a, x) memset(a, x, sizeof(a))
#define ALL(a) a.begin(), a.end()
#define UNIQUE(a) a.erase(unique(ALL(a)), a.end())
typedef long long ll;

int n, MOD = 1000000007;

int main(int argc, char const *argv[]) {
	ios_base::sync_with_stdio(false);
	int x = 1;
	FOR(int i = 1; i <= n; i++) x = x * i % MOD;
	cout << x << endl;
	return 0;
}

Compiler output:
a.cc:14:35: error: macro "FOR" requires 2 arguments, but only 1 given
   14 |         FOR(int i = 1; i <= n; i++) x = x * i % MOD;
      |                                   ^
a.cc:3:9: note: macro "FOR" defined here
    3 | #define FOR(i, n) for(int i = 0; i < (n); i++)
      |         ^~~
a.cc: In function 'int main(int, const char**)':
a.cc:14:9: error: 'FOR' was not declared in this scope
   14 |         FOR(int i = 1; i <= n; i++) x = x * i % MOD;
      |         ^~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
#define int long long
#define MOD 1000000007

signed main(){
    int n;
    cin>>n;
    int ans=1;
    for(int i=1;i<=n;i++){
        ans*=n;
        ans%=MOD;
    }
    cout<<ans<<endl
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:20: error: expected ';' before 'return'
   14 |     cout<<ans<<endl
      |                    ^
      |                    ;
   15 |     return 0;
      |     ~~~~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
#define int long long
#define MOD 1e9+7
int pow(int n){
    if(n==1)return 1;
    return (n*pow(n-1))%MOD;
}
signed main(){
    int n;
    cin>>n;
    cout<<pow(n)<<endl;
    return 0;
}

Compiler output:
a.cc: In function 'long long int pow(long long int)':
a.cc:7:24: error: invalid operands of types 'long long int' and 'double' to binary 'operator%'
    7 |     return (n*pow(n-1))%MOD;
      |            ~~~~~~~~~~~~^
      |              |
      |              long long int
Language: C++

if __name__ == "__main__":
    N = int(input())
    res = 1
    MOD = 10 ** 9 + 7
    for i in range(1, N + 1):
        res *= i
        res %= MOD
    print (res)


Compiler output:
a.cc:1:1: error: expected unqualified-id before 'if'
    1 | if __name__ == "__main__":
      | ^~
Language: C++

include <iostream>

using namespace std;
#define SURPLUS 1000000009

int main(void){
    int N;
    cin >> N;
    
    int tmp = 1;
    for(int i = 0; i < N; i++){
        tmp *= 1;
        tmp = tmp % SURPLUS;
    }
    cout << tmp << end;
    
    return 0;
}


Compiler output:
a.cc:1:1: error: 'include' does not name a type
    1 | include <iostream>
      | ^~~~~~~
a.cc: In function 'int main()':
a.cc:8:5: error: 'cin' was not declared in this scope
    8 |     cin >> N;
      |     ^~~
a.cc:15:5: error: 'cout' was not declared in this scope
   15 |     cout << tmp << end;
      |     ^~~~
a.cc:15:20: error: 'end' was not declared in this scope
   15 |     cout << tmp << end;
      |                    ^~~
Language: C++

#include<iostream>

using namespace std;

int main()
{
	
	int n;
	
	cin>>n;
	
	cout<<n!/1000000007)<<endl;
	
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:16: error: expected ';' before '!' token
   12 |         cout<<n!/1000000007)<<endl;
      |                ^
      |                ;
Language: C++

#include "stdafx.h"
#include<iostream>
using namespace std;

int main()
{
	long long A,B=1;
	cin >> A;
	for (long long i = 1; i <= A; i++)
	{
		B = B*i % 1000000007;
	}
	cout << B << endl;
    return 0;
}




Compiler output:
a.cc:1:10: fatal error: stdafx.h: No such file or directory
    1 | #include "stdafx.h"
      |          ^~~~~~~~~~
compilation terminated.
Language: C++

#include<iostream>
#include<string>

using namespace std;
int main(){
 int A;
 int X=1;
 cin>>A;
 for(i=1;i<=A;i++){
 X=i*X;
}
 cout<<X%1000000007<<endl;
return 0
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:6: error: 'i' was not declared in this scope
    9 |  for(i=1;i<=A;i++){
      |      ^
a.cc:13:9: error: expected ';' before '}' token
   13 | return 0
      |         ^
      |         ;
   14 | }
      | ~
Language: Java


import java.util.Scanner;

public class Main {
	Scanner sc = new Scanner(System.in);
	int n=sc.nextInt();
	int j=1;
	int i=1;
	for(i=1;i<=n;i++){
	j=j*i%(10^9+7);}
	System.out.println(j);
	
}


Compiler output:
Main.java:9: error: illegal start of type
	for(i=1;i<=n;i++){
	^
Main.java:9: error: <identifier> expected
	for(i=1;i<=n;i++){
	     ^
Main.java:9: error: <identifier> expected
	for(i=1;i<=n;i++){
	         ^
Main.java:9: error: <identifier> expected
	for(i=1;i<=n;i++){
	            ^
Main.java:9: error: <identifier> expected
	for(i=1;i<=n;i++){
	              ^
Main.java:11: error: <identifier> expected
	System.out.println(j);
	                  ^
Main.java:11: error: <identifier> expected
	System.out.println(j);
	                    ^
7 errors
Language: C++


#include <iostream>
#include<math.h>
int main() {
  long long N;
  std::cin >> N;
  long long power = 1;
  for(long long i = 1; i <= N; i++){
    power = (power * N) % ((long long)pow(10, 9) + 7)
  }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:54: error: expected ';' before '}' token
    9 |     power = (power * N) % ((long long)pow(10, 9) + 7)
      |                                                      ^
      |                                                      ;
   10 |   }
      |   ~
Language: C++


#include <iostream>
int int main() {
  long long N;
  std::cin >> N;
  long long power = 1;
  for(long long i = 1; i <= N; i++){
    power = (power * N) % (pow(10, 9) + 7)
  }
  return 0;
}


Compiler output:
a.cc:3:1: error: two or more data types in declaration of 'main'
    3 | int int main() {
      | ^~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int ,int> P;
template < typename T > inline string toString( const T &a ) { ostringstream oss; oss << a; return oss.str(); };
#define mod 1e9+7
int main(){
ll n;
cin>>n;
double ans=1;
for(int i=2;i<=n;i++) ans=(ans*i)%mod;
cout<<ans<<endl;
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:34: error: invalid operands of types 'double' and 'double' to binary 'operator%'
   11 | for(int i=2;i<=n;i++) ans=(ans*i)%mod;
      |                           ~~~~~~~^
      |                               |
      |                               double
Language: C++

#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int ,int> P;
template < typename T > inline string toString( const T &a ) { ostringstream oss; oss << a; return oss.str(); };
#define mod 1e9+7
int main(){
ll n;
cin>>n;
ll ans=1;
for(int i=2;i<=n;i++) ans=(ans*i)%mod;
cout<<ans<<endl;
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:34: error: invalid operands of types 'll' {aka 'long long int'} and 'double' to binary 'operator%'
   11 | for(int i=2;i<=n;i++) ans=(ans*i)%mod;
      |                           ~~~~~~~^
      |                               |
      |                               ll {aka long long int}