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

#include <iostream>

const int M = 1e9 + 7;

int solve(int N) {
  long long ans = 1;
  for (int i = 1; i <= N; ++i) {
    ans = ans * i;
    if (ans % M)
      ans = ans % M;
    assert(ans != 0);
  }
  ans = ans % M;
  return ans;
}

void test() {
  assert(solve(3) == 6);
  assert(solve(10) == 3628800);
  assert(solve(100000) == 457992974);
  std::cout << "done" << std::endl;
}

int main() {
  int N;
  std::cin >> N;

  // test();
  std::cout << solve(N) << std::endl;
}


Compiler output:
a.cc: In function 'int solve(int)':
a.cc:11:5: error: 'assert' was not declared in this scope
   11 |     assert(ans != 0);
      |     ^~~~~~
a.cc:2:1: note: 'assert' is defined in header '<cassert>'; this is probably fixable by adding '#include <cassert>'
    1 | #include <iostream>
  +++ |+#include <cassert>
    2 | 
a.cc: In function 'void test()':
a.cc:18:3: error: 'assert' was not declared in this scope
   18 |   assert(solve(3) == 6);
      |   ^~~~~~
a.cc:18:3: note: 'assert' is defined in header '<cassert>'; this is probably fixable by adding '#include <cassert>'
Language: C++


#include <bits/stdc++.h>
using namespace std;
int main(){
int64_t n;
cin>>n;
int64_t p= 1;
for (int i = 1; i <= n; i++){
    p=p*i%(10000000007);
cout<<p<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:2: error: expected '}' at end of input
   11 | }
      |  ^
a.cc:4:11: note: to match this '{'
    4 | int main(){
      |           ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main()
{
  int n;
  cin>>n;
  long long int pow=1;
  for(i=1;i<=n;i++)
  {
	pow*=i;
  }
  cout<<pow;
}

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

#include <iostream>
#include <cstdint>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); ++i)

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

  int mod = 10e9 + 7;
  int64_t p = 1;
  for (i = 1; i <= N; ++i) p = p * i % mod;
  cout << p << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:18: warning: overflow in conversion from 'double' to 'int' changes value from '1.0000000007e+10' to '2147483647' [-Woverflow]
   10 |   int mod = 10e9 + 7;
      |             ~~~~~^~~
a.cc:12:8: error: 'i' was not declared in this scope
   12 |   for (i = 1; i <= N; ++i) p = p * i % mod;
      |        ^
Language: C++

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

int main(){
  int N;
  cin >> N;
  int64_t power = 1;
  for(int i = 1; i <= N; i++){
    power *= i;
    power = power%1000000007
  }
  cout << power << endl;
}


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

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

int main(){
  int N;
  cin >> N;
  int64_t power;
  for(int i = 1; i <= N; i++){
    power *= i;
  }
  cout << power%1000000007 << endl;
}

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

#include <bits/stdc++.h>
using namespace std;
 
unsigned GetDigit(int num){
    int digit=0;
    while(num!=0){
        num /= 10;
        digit++;
    }
    return digit;
}
 
int main() {
    int N;
    int ans = 1;
    cin >> N;
    
    for(int i=1;i<=N;i++)
        ans = ans*i;
    cout << ans << endl;
    if(GetDigit(ans)>=9){
        cout << ans%1000000007 << endl;
    }else{
        cout << ans << endl;
    }
    
    return 0;
}
#include <bits/stdc++.h>
using namespace std;
 
unsigned GetDigit(int num){
    int digit=0;
    while(num!=0){
        num /= 10;
        digit++;
    }
    return digit;
}

int main() {
    int N;
    int ans = 1;
    cin >> N;
    
    for(int i=1;i<=N;i++)
        ans = ans*i;
    if(GetDigit(ans)>=9){
        cout << ans%1000000007 << endl;
    }else{
        cout << ans << endl;
    }
    
    return 0;
}

Compiler output:
a.cc:32:10: error: redefinition of 'unsigned int GetDigit(int)'
   32 | unsigned GetDigit(int num){
      |          ^~~~~~~~
a.cc:4:10: note: 'unsigned int GetDigit(int)' previously defined here
    4 | unsigned GetDigit(int num){
      |          ^~~~~~~~
a.cc:41:5: error: redefinition of 'int main()'
   41 | int main() {
      |     ^~~~
a.cc:13:5: note: 'int main()' previously defined here
   13 | int main() {
      |     ^~~~
Language: C++

#include<bits/stdc++.h>


using namespace std;
 
int main(){
    long long int N,ans;
    ans = 1;
    for(long long int i = 1; i < N+1; i++){
        ans *= i;
    }

    cout << ans % (pow(10,9) + 7);
        return 0;
    

}


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

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

int main(){
    //入力
    int N;
    cin >> N;

    //計算
    int64_t ans=1;

    for(int i=0;i<N;i++){
        ans*=(i+1);
        ans%=(pow(10,9)+7);
    }

    //出力
    cout << ans << endl;

}


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

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

int kaijou(int n){
  if(n==1)return 1;
  return n*kaijou(n-1);
}

int main(){
  long long power = 1,x;
  int n;
  cin >> n;
  x = powl(10,9)+7;
  
  long long a = kaijou(n);
  cout << a(int) % x(int)  << endl;
  
  
}


Compiler output:
a.cc: In function 'int main()':
a.cc:16:13: error: expected primary-expression before 'int'
   16 |   cout << a(int) % x(int)  << endl;
      |             ^~~
a.cc:16:16: error: 'a' cannot be used as a function
   16 |   cout << a(int) % x(int)  << endl;
      |                ^
a.cc:16:22: error: expected primary-expression before 'int'
   16 |   cout << a(int) % x(int)  << endl;
      |                      ^~~
a.cc:16:25: error: 'x' cannot be used as a function
   16 |   cout << a(int) % x(int)  << endl;
      |                         ^
Language: C++

#include <iostream>
using namespace std;

int main(void) {
  int i;
  cin >> i;
  double power = 1;
  
  for (int a=1; a<=i; i++) {
    power = i * power % 1000000007;
  }
  
  cout << power << endl;
  
  return 0;
}

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

#include <iostream>
using namespace std;
int main(){
  int N;
  int power = 1;
  for (i=1;i<=N;++i){
    power = (power*i) % (10^9 + 7);
  }
  cout << power;
  return 0;
}

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

    #include <iostream>
    using namespace std;
     
    int main() {
        long long int n, i, p = 1, M = 1000000007;
        cin>>n;
        for (i = 1; i <= n; i++)
            p = (p * i) % M;
        cout<<p;
    	return 0;
    }

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

#include<iostream>
#include<cmath>
using namespace std;
 
int main()
{
const unsigned int M=1000000007;
    unsigned long long r=1;
    int n;
    cin>>n;
    for( int i=1;i<=n;i++){
        r=(r*i)%M;
    }
    cout<<r<<endl;
 
    return 0;
}

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

#include <stdio.h>
#include <stdlib.h>
#include <math.h>
long long int fact(long long int x);
int main()
{    long long int k,s;
    long long int n;
scanf("%lld",&n);
k=fact(n);
s=s%(pow(10,9)+7);
printf("%lld",s);
return 0;
}
long long int fact(long long int x)
{ if(x==0 || x==1)
   return 1;
else
  return x*fact(x-1);
}

Compiler output:
main.c: In function 'main':
main.c:10:4: error: invalid operands to binary % (have 'long long int' and 'double')
   10 | s=s%(pow(10,9)+7);
      |    ^~~~~~~~~~~~~~
      |               |
      |               double
Language: C

#include<stdi.h>
int main()
{
int i;
long n;
scanf("%lld",&n);
i=0;
while(i>=n)
{
ans*=i;
}

printf("%ld",ans%(1000000000+7));
}

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

#include <stdio.h>
#include <stdlib.h>
long long int(long long int x);
int main()
{    long long int k,s;
    long long int n;
scanf("%lld",&n);
k=fact(n);
s=s%(pow(10,9)+7);
printf("%lld",s);
return 0;
}
long long int(long long int x)
{ if(x==0 || x==1)
   return 1;
else
  return x*fact(x-1);
}

Compiler output:
main.c:3:15: error: expected identifier or '(' before 'long'
    3 | long long int(long long int x);
      |               ^~~~
main.c: In function 'main':
main.c:8:3: error: implicit declaration of function 'fact' [-Wimplicit-function-declaration]
    8 | k=fact(n);
      |   ^~~~
main.c:9:6: error: implicit declaration of function 'pow' [-Wimplicit-function-declaration]
    9 | s=s%(pow(10,9)+7);
      |      ^~~
main.c:3:1: note: include '<math.h>' or provide a declaration of 'pow'
    2 | #include <stdlib.h>
  +++ |+#include <math.h>
    3 | long long int(long long int x);
main.c:9:6: warning: incompatible implicit declaration of built-in function 'pow' [-Wbuiltin-declaration-mismatch]
    9 | s=s%(pow(10,9)+7);
      |      ^~~
main.c:9:6: note: include '<math.h>' or provide a declaration of 'pow'
main.c:9:4: error: invalid operands to binary % (have 'long long int' and 'double')
    9 | s=s%(pow(10,9)+7);
      |    ^~~~~~~~~~~~~~
      |               |
      |               double
main.c: At top level:
main.c:13:15: error: expected identifier or '(' before 'long'
   13 | long long int(long long int x)
      |               ^~~~
Language: C

#include<stdio.h>
int main()
{
int i;
long long n;
scanf("%d",&n);
i=0;
while(i>=n)
{
ans*=i;
}

printf("%d",ans%1000000000+7);
}

Compiler output:
main.c: In function 'main':
main.c:10:1: error: 'ans' undeclared (first use in this function)
   10 | ans*=i;
      | ^~~
main.c:10:1: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include<stdi.h>
int main()
{
int i;
long long n;
scanf("%d",&n);
i=0;
while(i>=n)
{
ans*=i;
}

printf("%d",ans%(1000000000+7));
}

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

#include <stdio.h>
#include <stdlib.h>
long long int(long long int x);
int main()
{
    long long int n;
scanf("%lld",&n);

printf("%lld",fact(n));
return 0;
}
long long int(long long int x)
{ if(x==0 || x==1)
   return 1;
else
  return n*fact(n-1);
}

Compiler output:
main.c:3:15: error: expected identifier or '(' before 'long'
    3 | long long int(long long int x);
      |               ^~~~
main.c: In function 'main':
main.c:9:15: error: implicit declaration of function 'fact' [-Wimplicit-function-declaration]
    9 | printf("%lld",fact(n));
      |               ^~~~
main.c: At top level:
main.c:12:15: error: expected identifier or '(' before 'long'
   12 | long long int(long long int x)
      |               ^~~~
Language: C++

#include<iostream>
using namespace std;

#forでも階乗かける
long fact(int n)
{
  if(n==1) return 1;
  return (n * fact(n-1)) % (1000000007);
}

int main()
{
  int n;
  cin >> n;
 
  long ans;
  ans = fact(n);
  cout << ans << endl;
  
}

Compiler output:
a.cc:4:2: error: invalid preprocessing directive #for\U00003067\U00003082\U0000968e\U00004e57\U0000304b\U00003051\U0000308b
    4 | #forでも階乗かける
      |  ^~~~~~~~~~~~~~~~~
Language: C++

#include<bits/stdc++.h>
typedef long long ll;
typedef vector<int> vi;
typedef vector<vector<int>> vvi;
using namespace std;
#define rep(i,n) for(int i=0;i<(n);i++)
#define reps(i,l,n) for(int i=(l);i<(n);i++)
int mod=1000000007;

int main(){
    ll power=1;
    int N;
    cin >> N;
    rep(i,N){
        power*=i+1;
        power/=mod; 
    }
    cout << power << endl;
    return 0;
}

Compiler output:
a.cc:3:9: error: 'vector' does not name a type
    3 | typedef vector<int> vi;
      |         ^~~~~~
a.cc:4:9: error: 'vector' does not name a type
    4 | typedef vector<vector<int>> vvi;
      |         ^~~~~~
Language: Java

import java.util.*;

class Main {
public static void main(String[] args){

Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int ans = 1;
for(int i = 1;i <= n;i++){
  ans *= i;
}
ans = ans % (1000000000 + 7);
System.out.println(ans);

}


Compiler output:
Main.java:15: error: reached end of file while parsing
}
 ^
1 error
Language: Java

import java.util.*;
import java.lang.Math;

class Main {
public static void main(String[] args){

Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
long ans = 1;
for(int i = 1;i <= n;i++){
  ans *= i;
}
ans = ans % (Math.pow(10,9) + 7);
System.out.println(ans);

}
}

Compiler output:
Main.java:13: error: incompatible types: possible lossy conversion from double to long
ans = ans % (Math.pow(10,9) + 7);
          ^
1 error
Language: C++

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:6:3: error: 'mod' was not declared in this scope; did you mean 'modf'?
    6 |   mod=1000000007;
      |   ^~~
      |   modf
Language: C++

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

int main() {
    ios::sync_with_stdio(false);
    cin.tie(NULL);
    long long N, answer = 1;
    cin >> N;
    for (long long i = 1; i <= N; ++i) {
        answer = (answer * i) % mod;
    }
    cout << answer << endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:33: error: 'mod' was not declared in this scope; did you mean 'modf'?
   13 |         answer = (answer * i) % mod;
      |                                 ^~~
      |                                 modf
Language: C++

#include<iostream>
#include<cmath>
using namespace std;
int main(){
    int n;
    cin>>n;
    int res=1;
    for(int i=1;i<=n;i++){
        res*=i;
        res%=(pow(10,9)+7);
    }
    cout<<res<<endl;
    return 0;

}


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

#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i=0; i<(int)(n); i++)

int main(){
  long long int n,ans;
  cin >> n;
  ans = 0;
  rep(i,n){ans = ans*n;}
  cout << ans%(pow(10,9)+7) << endl;

	return 0;
}


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

#include<stdio.h>
int main(){
    int n,i,
    long ans=0;
    scanf("%d",&n);
    for(i=1;i<=n;i++){
        ans=ans*i%1000000007;
    }
    printf("%ld",ans);
    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:4:5: error: expected identifier or '(' before 'long'
    4 |     long ans=0;
      |     ^~~~
main.c:7:9: error: 'ans' undeclared (first use in this function)
    7 |         ans=ans*i%1000000007;
      |         ^~~
main.c:7:9: note: each undeclared identifier is reported only once for each function it appears in
Language: C

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

Compiler output:
main.c: In function 'main':
main.c:4:5: error: expected identifier or '(' before 'long'
    4 |     long ans=0;
      |     ^~~~
main.c:7:9: error: 'ans' undeclared (first use in this function)
    7 |         ans=ans*i%1000000007;
      |         ^~~
main.c:7:9: note: each undeclared identifier is reported only once for each function it appears in
Language: C++

#include<iostream>
int main(){
int t,ans=1;std::cin>>t;for(int i=0;i<t;i++) ans=ans*t%(1e9+7);std::cout<<ans<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:3:55: error: invalid operands of types 'int' and 'double' to binary 'operator%'
    3 | int t,ans=1;std::cin>>t;for(int i=0;i<t;i++) ans=ans*t%(1e9+7);std::cout<<ans<<endl;
      |                                                  ~~~~~^~~~~~~~
      |                                                     |      |
      |                                                     int    double
a.cc:3:80: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
    3 | int t,ans=1;std::cin>>t;for(int i=0;i<t;i++) ans=ans*t%(1e9+7);std::cout<<ans<<endl;
      |                                                                                ^~~~
      |                                                                                std::endl
In file included from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: C++

#include <iostream>

using namespace std;

int main() {
	long long a,x=1;
	cin>>a;
	for(int i=0;i<a;i++)
        x*=i;
        x%=1e9+7;
}
		cout<<x%1e9+7<<endl;

	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:10: error: invalid operands of types 'long long int' and 'double' to binary 'operator%'
   10 |         x%=1e9+7;
      |         ~^~~~~~~
a.cc:10:10: note:   in evaluation of 'operator%=(long long int, double)'
a.cc: At global scope:
a.cc:12:17: error: 'cout' does not name a type
   12 |                 cout<<x%1e9+7<<endl;
      |                 ^~~~
a.cc:14:9: error: expected unqualified-id before 'return'
   14 |         return 0;
      |         ^~~~~~
a.cc:15:1: error: expected declaration before '}' token
   15 | }
      | ^
Language: C++

#include<cstdio>
#include<iostream>
#include<algorithm>
#include<cmath>//常用文件头，不知道的可以记一下
using namespace std;
long long n,m=1,k;//设a初始值为1，不然在之后的阶乘中0乘什么数都等于0
int main()
{
    cin>>n
    for (long long i=1;i<=n;i++)//这里定义i要用long long，不然用int的话就会......
    {
    	k=i%1000000007;//计算出现在阶乘到多少了
        m*=k;//阶乘
    }
    cout<<m;
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:11: error: expected ';' before 'for'
    9 |     cin>>n
      |           ^
      |           ;
   10 |     for (long long i=1;i<=n;i++)//这里定义i要用long long，不然用int的话就会......
      |     ~~~    
a.cc:10:24: error: 'i' was not declared in this scope
   10 |     for (long long i=1;i<=n;i++)//这里定义i要用long long，不然用int的话就会......
      |                        ^
Language: C++

#include<cstdio>
#include<iostream>
#include<algorithm>
#include<cmath>//常用文件头，不知道的可以记一下
using namespace std;
long long n,m=1,k;//设a初始值为1，不然在之后的阶乘中0乘什么数都等于0
int main()
{
    cin>>n
    for(long long i=1;i<=n;i++)//这里定义i要用long long，不然用int的话就会......
    {
    	k=i%1000000007;//计算出现在阶乘到多少了
        m*=k;//阶乘
    }
    cout<<m;
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:11: error: expected ';' before 'for'
    9 |     cin>>n
      |           ^
      |           ;
   10 |     for(long long i=1;i<=n;i++)//这里定义i要用long long，不然用int的话就会......
      |     ~~~    
a.cc:10:23: error: 'i' was not declared in this scope
   10 |     for(long long i=1;i<=n;i++)//这里定义i要用long long，不然用int的话就会......
      |                       ^
Language: C++

#include <iostream>
using namespace std;

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


Compiler output:
a.cc: In function 'int main()':
a.cc:13:32: error: expected '}' at end of input
   13 |   cout << b%1000000007 << endl;
      |                                ^
a.cc:4:11: note: to match this '{'
    4 | int main(){
      |           ^
Language: C++

#include <iostream>
using namespace std;

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


Compiler output:
a.cc: In function 'int main()':
a.cc:6:6: error: expected ';' before 'a'
    6 |   cin a;
      |      ^~
      |      ;
a.cc:13:32: error: expected '}' at end of input
   13 |   cout << b%1000000007 << endl;
      |                                ^
a.cc:4:11: note: to match this '{'
    4 | int main(){
      |           ^
Language: C++

#include <iostream>
using namespace std;

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

Compiler output:
a.cc: In function 'int main()':
a.cc:6:6: error: expected ';' before 'a'
    6 |   cin a;
      |      ^~
      |      ;
a.cc:10:16: error: expected ';' before 'i'
   10 |   for (int i =1 i<=a i++){
      |                ^~
      |                ;
a.cc:10:21: error: expected ';' before 'i'
   10 |   for (int i =1 i<=a i++){
      |                     ^~
      |                     ;
a.cc:13:32: error: expected '}' at end of input
   13 |   cout << b%1000000007 << endl;
      |                                ^
a.cc:4:11: note: to match this '{'
    4 | int main(){
      |           ^
Language: C

#include<stdio.h>
int main(void){
  int a,b,n;
  int c=1;
   scanf("%d",&n);
  for(a=1;a<=n;a++){
  c*=a;
    b=c;
  println("%d\n",b%(10**9+7));
  }
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:9:3: error: implicit declaration of function 'println'; did you mean 'printf'? [-Wimplicit-function-declaration]
    9 |   println("%d\n",b%(10**9+7));
      |   ^~~~~~~
      |   printf
main.c:9:24: error: invalid type argument of unary '*' (have 'int')
    9 |   println("%d\n",b%(10**9+7));
      |                        ^~
Language: C++

#include <bits/stdc++.h>
#define REP(i, n) for(ll i = 0; i < (ll)n; i++)
#define FOR(i, a, b) for(ll i = (a); i < (ll)b; i++)
#define ALL(obj) (obj).begin(), (obj).end()
#define INF (1ll << 60)
#define sz(x) int(x.size())
using namespace std;
typedef long long ll;
typedef double db;
typedef string str;
typedef pair<ll, ll> p;
constexpr int MOD = 1e9 + 7;
using ll = long long;
template <class T> inline bool chmin(T &a, T b) {
    if(a > b) {
        a = b;
        return true;
    }
    return false;
}
template <class T> inline bool chmax(T &a, T b) {
    if(a < b) {
        a = b;
        return true;
    }
    return false;
}

void print(const std::vector<int> &v) {
    std::for_each(v.begin(), v.end(), [](int x) { std::cout << x << " "; });
    std::cout << std::endl;
}

int main() {
    ll N;
    cin >> N;
    ll power = 1;
    for(int i = 1; i <= N; i++) {
        power *= i;
        power % = MOD;
    }

    cout << power % MOD << endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:40:17: error: expected primary-expression before '=' token
   40 |         power % = MOD;
      |                 ^
Language: C++

#include <bits/stdc++.h>
#define REP(i, n) for(ll i = 0; i < (ll)n; i++)
#define FOR(i, a, b) for(ll i = (a); i < (ll)b; i++)
#define ALL(obj) (obj).begin(), (obj).end()
#define INF (1ll << 60)
#define sz(x) int(x.size())
using namespace std;
typedef long long ll;
typedef double db;
typedef string str;
typedef pair<ll, ll> p;
constexpr int MOD = 10e9 + 7;
using ll = long long;
template <class T> inline bool chmin(T &a, T b) {
    if(a > b) {
        a = b;
        return true;
    }
    return false;
}
template <class T> inline bool chmax(T &a, T b) {
    if(a < b) {
        a = b;
        return true;
    }
    return false;
}

void print(const std::vector<int> &v) {
    std::for_each(v.begin(), v.end(), [](int x) { std::cout << x << " "; });
    std::cout << std::endl;
}

int main() {
    ll N;
    cin >> N;
    cout << N % MOD << endl;
    return 0;
}

Compiler output:
a.cc:12:26: warning: overflow in conversion from 'double' to 'int' changes value from '1.0000000007e+10' to '2147483647' [-Woverflow]
   12 | constexpr int MOD = 10e9 + 7;
      |                     ~~~~~^~~
a.cc:12:28: error: overflow in constant expression [-fpermissive]
   12 | constexpr int MOD = 10e9 + 7;
      |                            ^
a.cc:12:28: error: overflow in constant expression [-fpermissive]
Language: Java

import java.util.*;
import java.util.Arrays;
import java.lang.Math; 
import java.math.BigInteger;

public class B055 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        BigInteger sum = BigInteger.ONE;
        BigInteger kekka = BigInteger.ZERO;

        for(int i = 1 ; i <= N; i++){
            sum = sum.multiply(new BigInteger(String.valueOf(i)));
        }
        int b = 1000000007;
        kekka = sum.remainder(BigInteger.valueOf(b));

        System.out.println(kekka);
    }
}

Compiler output:
Main.java:6: error: class B055 is public, should be declared in a file named B055.java
public class B055 {
       ^
1 error
Language: C++

#include<iostream>
using namespace std;
int main()
{
    int a;
  	int result = 1;
  	int mod = 1000000007;
    cin >> a;
  	for(int i=1; i <=a; a++;){
      result *= a%mod;
    }
	cout << result << endl;
  	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:32: error: expected ')' before ';' token
    9 |         for(int i=1; i <=a; a++;){
      |            ~                   ^
      |                                )
a.cc:9:33: error: expected primary-expression before ')' token
    9 |         for(int i=1; i <=a; a++;){
      |                                 ^
Language: C++

#include<iostream>
using namespace std;
int main()
{
    int a;
  	int result = 1;
  	int mod = 1000000007;
    cin >> a;
  	for(int i=1; i <=a; a++;){
      result *= a%mod;
    }
	cout << reuslt << endl;
  	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:32: error: expected ')' before ';' token
    9 |         for(int i=1; i <=a; a++;){
      |            ~                   ^
      |                                )
a.cc:9:33: error: expected primary-expression before ')' token
    9 |         for(int i=1; i <=a; a++;){
      |                                 ^
a.cc:12:17: error: 'reuslt' was not declared in this scope; did you mean 'result'?
   12 |         cout << reuslt << endl;
      |                 ^~~~~~
      |                 result
Language: C++

#include<iostream>
using namespace std;
int main()
{
    int a;
  	int result = 1;
  	int mod = 1000000007;
    cin >> a;
  	for(int i=1; i <=a a++;){
      result *= a%mod;
    }
	cout << reuslt << endl;
  	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:27: error: expected ';' before 'a'
    9 |         for(int i=1; i <=a a++;){
      |                           ^~
      |                           ;
a.cc:9:31: error: expected ')' before ';' token
    9 |         for(int i=1; i <=a a++;){
      |            ~                  ^
      |                               )
a.cc:9:32: error: expected primary-expression before ')' token
    9 |         for(int i=1; i <=a a++;){
      |                                ^
a.cc:12:17: error: 'reuslt' was not declared in this scope; did you mean 'result'?
   12 |         cout << reuslt << endl;
      |                 ^~~~~~
      |                 result
Language: C++

#include<iostream>
using namespace std;
int main()
{
    int a;
  	int result = 1;
  	int mod = 1000000007;
    cin >> a;
  	for(int i=1; i <=a a++){
      result *= a%mod;
    }
	cout << reuslt << endl;
  	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:27: error: expected ';' before 'a'
    9 |         for(int i=1; i <=a a++){
      |                           ^~
      |                           ;
a.cc:12:17: error: 'reuslt' was not declared in this scope; did you mean 'result'?
   12 |         cout << reuslt << endl;
      |                 ^~~~~~
      |                 result
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define rep2(i, s, n) for (int i = (s); i < (int)(n); i++)
typedef long long ll;
const int big = 1000000007

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


Compiler output:
a.cc:8:1: error: expected ',' or ';' before 'int'
    8 | int main() {
      | ^~~
Language: C++

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

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



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

#include <iostream>

using namespace std;

long long int D = 1000000007;

int main(){
  long long int I;
  cin >> I
  long long int ans = 1LL;
  for(int i = 1; i <= I; i++){
    ans = (ans * i) % D;
  }
  cout << ans;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:11: error: expected ';' before 'long'
    9 |   cin >> I
      |           ^
      |           ;
   10 |   long long int ans = 1LL;
      |   ~~~~     
a.cc:12:5: error: 'ans' was not declared in this scope; did you mean 'abs'?
   12 |     ans = (ans * i) % D;
      |     ^~~
      |     abs
a.cc:14:11: error: 'ans' was not declared in this scope; did you mean 'abs'?
   14 |   cout << ans;
      |           ^~~
      |           abs
Language: C++

#include<iostream>
using namespace std;
int main(){
	 int n,ans=1;
  	cin >>n;
  	for(int i=1;i<=n;i++){
      ans = ans%1e9+7;
      ans *= i;
    }
  	cout<<ans<<endl;
  	return 0;
}

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

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

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

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

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

#include<stdio.h>
int main(void){
  int n;
  long int power = 1;
  scanf("%d",&n);
  for(int i = 1;i<=n;i++){
    power *= i;
    power %= 1000000007;
  }
  printf("%lld",power)
  return 0;
}


Compiler output:
main.c: In function 'main':
main.c:10:23: error: expected ';' before 'return'
   10 |   printf("%lld",power)
      |                       ^
      |                       ;
   11 |   return 0;
      |   ~~~~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
long long n,cnt=1;
int main(){
	scanf("%lld",&n);
	for(int i=1;i<=n;i++){
		cnt*=i;
		cnt%=(1e9+7);
	}
	printf("%lld",cnt);
}

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

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

int main(){
  int n;
  cin>>n;
  int sum=1;
  for(;0<n;n--){
    sum *=n;
    sum%=pow(10,9)+7;
  }
  cout<<sum<<endl;
}

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

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

int main() {
  int64_t S;
  cin>>S;
  int64_t G=1;
  for(int i=0; i<S; i++){
    G*=(i+1);
}
cout<<Gmod(1E9+711)<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:7: error: 'Gmod' was not declared in this scope; did you mean 'fmod'?
   11 | cout<<Gmod(1E9+711)<<endl;
      |       ^~~~
      |       fmod
Language: C++

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

int main() {
  int64_t S;
  cin>>S;
  int64_t G=1;
  for(int i=0; i<S; i++){
    G*=(i+1);
}
cout<<G%(1E9+711)<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:8: error: invalid operands of types 'int64_t' {aka 'long int'} and 'double' to binary 'operator%'
   11 | cout<<G%(1E9+711)<<endl;
      |       ~^~~~~~~~~~
      |       |     |
      |       |     double
      |       int64_t {aka long int}
Language: C++

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

int main() {
  int64_t S;
  cin>>S;
  int64_t G=1;
  for(int i=0; i<S; i++){
    G*=(i+1);
}
cout<<G%(1E9+7)<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:8: error: invalid operands of types 'int64_t' {aka 'long int'} and 'double' to binary 'operator%'
   11 | cout<<G%(1E9+7)<<endl;
      |       ~^~~~~~~~
      |       |     |
      |       |     double
      |       int64_t {aka long int}
Language: C++

#include <iostream>
#include <cstdlib>
#include <vector>
#include <algorithm>
#include <string>
#include <cmath>
#include <new>
#include <map>

using namespace std;
 
int main() {
	int n,power;
	for(int i = 0; i < n;i++){
	     power = power * i;
	}
    
	cout << power % (pow(10,9) + 7) << endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:23: error: invalid operands of types 'int' and '__gnu_cxx::__promote<double>::__type' {aka 'double'} to binary 'operator%'
   18 |         cout << power % (pow(10,9) + 7) << endl;
      |                 ~~~~~ ^ ~~~~~~~~~~~~~~~
      |                 |                  |
      |                 int                __gnu_cxx::__promote<double>::__type {aka double}
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
    long long int n,ans;
    ans=1;
    cin >> n;
    for(int i=1;i<=n;i++){
     ans*=i;
   }
  cout<<ans%pow(10,9)+7<<endl;
}


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

#include <bits/stdc++.h>
using namespace std;
 
int main() {
    long long int n,ans;
    ans=1;
    cin >> n;
    for(int i=1;i<=n;i++){
     ans*=i;
   }
  cout<<ans%(pow(10,9)+7)<<endl;
}


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

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

Compiler output:
a.cc:8:3: error: extended character 　 is not valid in an identifier
    8 |   　for(int i=1;i<=n;i++){
      |   ^
a.cc: In function 'int main()':
a.cc:8:9: error: expected primary-expression before 'int'
    8 |   　for(int i=1;i<=n;i++){
      |         ^~~
a.cc:8:17: error: 'i' was not declared in this scope
    8 |   　for(int i=1;i<=n;i++){
      |                 ^
Language: C++

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

int main() {
  int128_t S;
  cin>>S;
  int128_t G=1;
  for(int i=0; i<S; i++){
    G*=(i+1);
}
cout<<G%(10*10*10*10*10*10*10*10*10+7)<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:3: error: 'int128_t' was not declared in this scope; did you mean 'int8_t'?
    5 |   int128_t S;
      |   ^~~~~~~~
      |   int8_t
a.cc:6:8: error: 'S' was not declared in this scope
    6 |   cin>>S;
      |        ^
a.cc:7:11: error: expected ';' before 'G'
    7 |   int128_t G=1;
      |           ^~
      |           ;
a.cc:9:5: error: 'G' was not declared in this scope
    9 |     G*=(i+1);
      |     ^
a.cc:11:7: error: 'G' was not declared in this scope
   11 | cout<<G%(10*10*10*10*10*10*10*10*10+7)<<endl;
      |       ^
Language: C++

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

int main() {
  int64_t S;
  cin>>S;
  int128_t G=1;
  for(int i=0; i<S; i++){
    G*=(i+1);
}
cout<<G%(10*10*10*10*10*10*10*10*10+7)<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:3: error: 'int128_t' was not declared in this scope; did you mean 'int8_t'?
    7 |   int128_t G=1;
      |   ^~~~~~~~
      |   int8_t
a.cc:9:5: error: 'G' was not declared in this scope
    9 |     G*=(i+1);
      |     ^
a.cc:11:7: error: 'G' was not declared in this scope
   11 | cout<<G%(10*10*10*10*10*10*10*10*10+7)<<endl;
      |       ^
Language: C++

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

int main() {
  int64_t S;
  cin>>S;
  int64_t G=1;
  for(int i=0; i<S; i++)
    G*=i;
}
cout<<G%(10*10*10*10*10*10*10*10*10+7)<<endl;
}

Compiler output:
a.cc:11:1: error: 'cout' does not name a type
   11 | cout<<G%(10*10*10*10*10*10*10*10*10+7)<<endl;
      | ^~~~
a.cc:12:1: error: expected declaration before '}' token
   12 | }
      | ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i=0; i<n; i++)
#define MOD 10e9+7

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

Compiler output:
a.cc: In function 'int main()':
a.cc:10:27: error: invalid operands of types 'long long int' and 'double' to binary 'operator%'
   10 |         power = (power*i) % MOD;
      |                 ~~~~~~~~~ ^
      |                       |
      |                       long long int
Language: C++

#include<bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i=0; i<n; i++)
#define MOD 10e9+7

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

Compiler output:
a.cc: In function 'int main()':
a.cc:11:5: error: expected primary-expression before '}' token
   11 |     }
      |     ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i=0; i<n; i++)
#define MOD 10e9+7

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

Compiler output:
a.cc: In function 'int main()':
a.cc:8:5: error: 'power' was not declared in this scope
    8 |     power = 1;
      |     ^~~~~
a.cc:11:5: error: expected primary-expression before '}' token
   11 |     }
      |     ^
Language: Java

import java.util.*;
public class Main{
	public static void main(String[] args){
    	Scanner sc = new Scanner(System.in);
      int n = sc.nextInt();
      int m = 1;
      int k = (int)Math.pow(10,9)+7
      for(int i = 1;i <= n;i++){
      	m = (m*i)%k;
      }
      System.out.println(m);
    }
}

Compiler output:
Main.java:7: error: ';' expected
      int k = (int)Math.pow(10,9)+7
                                   ^
1 error
Language: Java

import java.io.InputStream;
import java.util.Scanner;

/**
 * AtCoder Beginner Contest 055<br>
 * B - Training Camp<br>
 * <br>
 * <a href="https://atcoder.jp/contests/abc055/tasks/abc055_b">AtCoderへのリンク</a><br>
 */
public class Main {

    /**
     * エントリポイント
     */
    public static void main(String[] args) {
        // 入力
        int N = input(System.in);
        // 演算
        long power = proc(N);
        // 出力
        System.out.println(power);
    }

    /**
     * 入力値を取得
     */
    static int input(InputStream in) {
        int result = 0;
        try (Scanner sc = new Scanner(in)) {
            result = sc.nextInt();
        }
        return result;
    }

    /**
     *  演算を行う
     */
    static double proc(int N) {
        long power = 1;
        // TODO:実装する
        
        
        double d = 1;
        for( long i = 1; i<=N ; ++i )
        {
          d = d * N;
        }
        return d % ( 10^9 + 7 );


    }

}

Compiler output:
Main.java:19: error: incompatible types: possible lossy conversion from double to long
        long power = proc(N);
                         ^
1 error
Language: C++

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:12:3: error: expected ',' or ';' before 'cout'
   12 |   cout<<ans;
      |   ^~~~
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:11:19: error: 'a' was not declared in this scope
   11 |     printf("%lld",a);
      |                   ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main() {
int N,i;
double d;
long long int a,c;
cin>>N;
    a=1;
    for(i=1;i<=N;i++){
        a=a*i;
    }
    d=1e9;
    c= a % (d+7);
    cout<<c;
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:13:10: error: invalid operands of types 'long long int' and 'double' to binary 'operator%'
   13 |     c= a % (d+7);
      |        ~ ^ ~~~~~
      |        |     |
      |        |     double
      |        long long int
Language: C++

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


int main() {

  int n;
  long long ans = 1;
  cin >> n;
  for (int i = 1; i <= n; i++) {
    ans = (i * ans) % 1000000007;
  }



Compiler output:
a.cc: In function 'int main()':
a.cc:12:4: error: expected '}' at end of input
   12 |   }
      |    ^
a.cc:5:12: note: to match this '{'
    5 | int main() {
      |            ^
Language: C++

#include <iostream>
using namespace std;

int main() {
	const int a = pow(10,9) + 7;
	int n;
	unsigned long long int ret=1;
	cin >> n;
	for (int i = 1; i <= n; i++) {
		ret = ret*i%a;
	}
	cout << ret << endl;
	return 0;
}

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

#include <iostream>
using namespace std;
#define mod 1000000007

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

Compiler output:
a.cc: In function 'int main()':
a.cc:11:12: error: 'MOD' was not declared in this scope
   11 |     ans %= MOD;
      |            ^~~
Language: C++

#include <iostream>
using namespace std;
define MOD 1000000007;

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

Compiler output:
a.cc:3:1: error: 'define' does not name a type
    3 | define MOD 1000000007;
      | ^~~~~~
a.cc: In function 'int main()':
a.cc:11:12: error: 'MOD' was not declared in this scope
   11 |     ans %= MOD;
      |            ^~~
Language: C++

#include<bits/stdc++.h>
#define rep(i,n) for(int (i) = 0;(i) < (n);(i)++)
#define SORT(c) sort((c).begin(),(c).end())
//#define MOD 1000000007 //S.size()
using namespace std;
typedef unsigned long long ll;
const long long mod = 10e9 + 7
int main(void){
	int N;
	cin >> N;
	long long ans = 1;
	for(long long i = 1; i <= N; i++){
		ans *= i;
		ans %= mod;
	}
	cout << ans << endl;

	return 0;
}


Compiler output:
a.cc:8:1: error: expected ',' or ';' before 'int'
    8 | int main(void){
      | ^~~
Language: C

#include<stdio.h>
int main(){
  double n,x,ans;
  scanf("%lf", &n);
  for(x=1; x<=n; x++){
    sum=1;
    sum=sum*x;
  }
  ans=sum%1000000007;
  printf("%lf\n", ans);
  return 0;

}

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

#include <bits/stdc++.h>
#define int long long
#define rep(i,n) for(int i=0;i<n;i++)
#define all(a) a.begin(),a.end()
#define P pair<long long,long long>
#define double long double
using namespace std;
const int mod=100000007
int fact(int k){
    int sum=1;
    for (int i=1;i<=k;i++){
        sum*=i;
sum%=mod;
    }
    return sum;
}
signed main(){
  int a;
  cin>>a;
  cout<<fact(a);
}

Compiler output:
a.cc:2:13: error: expected ',' or ';' before 'long'
    2 | #define int long long
      |             ^~~~
a.cc:9:1: note: in expansion of macro 'int'
    9 | int fact(int k){
      | ^~~
a.cc: In function 'int main()':
a.cc:20:9: error: 'fact' was not declared in this scope
   20 |   cout<<fact(a);
      |         ^~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(i,n) for(int i=0;i<(int)(n);i++)
#define rep1(i,n) for(int i=1;i<=(int)(n);i++)
#define fs first
#define sc second
typedef pair<ll, ll> l_l;
#define EPS (1e-7)
#define INF (1e9)
#define PI (acos(-1))

int main(){
  int n;
  cin>>n;
  ll ans=1;
  rep1(i,n){
   ans=ans*i%((ll)pow(10,9)+7));
  }
  cout<<ans<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:31: error: expected ';' before ')' token
   18 |    ans=ans*i%((ll)pow(10,9)+7));
      |                               ^
      |                               ;
Language: C++

#include<iostream>
using namespace std;
#define MOD 1000000000 + 7

int main(){
    int N;
    cin >> N ;
    functional(N,N);

}

//First rem must be N
int functional(int N, int rem){
    int next = rem * N-1;
    int reminder = next % MOD;
    if(N - 1 == 1) return reminder;
    else functional(N-1, reminder);
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:5: error: 'functional' was not declared in this scope
    8 |     functional(N,N);
      |     ^~~~~~~~~~
a.cc: In function 'int functional(int, int)':
a.cc:17:20: warning: control reaches end of non-void function [-Wreturn-type]
   17 |     else functional(N-1, reminder);
      |          ~~~~~~~~~~^~~~~~~~~~~~~~~