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

import java.util.Random;
public class Elementary Number Theory - Power{
       public static void main(String[] args){
                Random stdIn = new Random();
                
                int m = stdIn.nextInt(100) + 1;
                int n = stdIn.nextInt(1000000000) + 1;
                int x = 1;
                for(int i = 0;i < n;i++){
                     x *= m;
                }
                int y = x % 1000000007;
                System.out.println(y);
       }
}

Compiler output:
Main.java:2: error: '{' expected
public class Elementary Number Theory - Power{
                       ^
1 error
Language: Java

import java.util.Random;
public class Elementary Number Theory - Power{
       public static void main(String[] args){
                Random stdIn = new Random();
                
                int m = stdIn.nextInt(100) + 1;
                int n = stdIn.nextInt(1000000000) + 1;
                int x = Math.pow(m,n);
                int y = x % 1000000007;
                System.out.println(y);
       }
}

Compiler output:
Main.java:2: error: '{' expected
public class Elementary Number Theory - Power{
                       ^
1 error
Language: Java

import java.util.Random;
class Elementary Number Theory - Power{
       public static void main(String[] args){
                Random stdIn = new Random();
                
                int m = stdIn.nextInt(100) + 1;
                int n = stdIn.nextInt(1000000000) + 1;
                int x = Math.pow(m,n);
                int y = x % 1000000007;
                System.out.println(y);
       }
}

Compiler output:
Main.java:2: error: '{' expected
class Elementary Number Theory - Power{
                ^
1 error
Language: Java

import java.util.Random;
class Elementary{
       public static void main(String[] args){
                Random stdIn = new Random();
                
                int m = stdIn.nextInt(100) + 1;
                int n = stdIn.nextInt(1000000000) + 1;
                int x = Math.pow(m,n);
                int y = x % 1000000007;
                System.out.println(y);
       }
}

Compiler output:
Main.java:8: error: incompatible types: possible lossy conversion from double to int
                int x = Math.pow(m,n);
                                ^
1 error
Language: Java

import java.util.Random;
class Elementary{
       public static void main(String[] args){
                Random stdIn = new Random();
                
                int m = stdIn.nextInt(100) + 1;
                int n = stdIn.nextInt(1000000000) + 1;
                int x;
                x = Math.pow(m,n);
                int y = x % 1000000007;
                System.out.println(y);
       }
}

Compiler output:
Main.java:9: error: incompatible types: possible lossy conversion from double to int
                x = Math.pow(m,n);
                            ^
1 error
Language: Java

import java.util.Random;
class Elementary{
       public static void main(String[] args){
                Random stdIn = new Random();
                
                int m = stdIn.nextInt(100) + 1;
                int n = stdIn.nextInt(1000000000) + 1;
                double x;
                x = Math.pow(m,n);
                int y = x % 1000000007;
                System.out.println(y);
       }
}

Compiler output:
Main.java:10: error: incompatible types: possible lossy conversion from double to int
                int y = x % 1000000007;
                          ^
1 error
Language: Java

import java.util.Scanner;


public class NTL_1_B_Power {

	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		int m = in.nextInt();
		int n = in.nextInt();
		
		//System.out.println(pow(m,n));
		System.out.println(pow(m,n,1000000007));
	}

	static long pow(int m, int n) {
		long res = 1;
		while (n>0) {
			if ((n&1)==1)
				res *= m;
			m *= m;
			n=n>>1;
		}
		return res;
	}
	
	static long pow(int m, int n, int mod) {
		long res = 1;
		while (n>0) {
			if ((n&1)==1)
				res = (res*m)%mod;
			m = (m*m)%mod;
			n=n>>1;
		}
		return res;
	}
	
}

Compiler output:
Main.java:4: error: class NTL_1_B_Power is public, should be declared in a file named NTL_1_B_Power.java
public class NTL_1_B_Power {
       ^
1 error
Language: Java

public class Main {

  private static long power(long m, long n) {
    long res;
    long MODE = 1000000007;

    if (n == 0) {
      return 1;
    }
    res = power(m * m % MODE, n / 2);
    if (n % 2 == 1) {
      res = res * m % MODE;
    }
    return res;
  }

  public static void main(String[] args) {

    ArrayList inputs = new ArrayList();
    for (String string : args) {
      inputs.add(string);
    }

    long m = Long.parseLong((String) inputs.get(0));
    long n = Long.parseLong((String) inputs.get(1));

    System.out.println(power(m, n));
  }

}

Compiler output:
Main.java:19: error: cannot find symbol
    ArrayList inputs = new ArrayList();
    ^
  symbol:   class ArrayList
  location: class Main
Main.java:19: error: cannot find symbol
    ArrayList inputs = new ArrayList();
                           ^
  symbol:   class ArrayList
  location: class Main
2 errors
Language: Java

import java.util.*;
public class Main{
    public static void main(String[] args){
    new Main().run();
    }
    Scanner sc = new Scanner(System.in);
    long m, n;
    long INF = 1000000007;
 
    void run(){
    while(sc.hasNext()){
        m = sc.nextLong();
        n = sc.nextLong();
        if(m!=0 && n!=0) 
        System.out.println(solve(m, n));
    }
    }
     
    long solve(long m, long n){
    if(n==0)
        return 1;
     
    if(n%2==0){
        long a = solve(m, n/2);
        if(a>=INF) a %= INF;
        a = a*a;
        if(a>=INF) a %= INF;
        return a;
    }
    else{
        long a = solve(m, n/2);
        if(a>=INF) a %= INF;
        a = a*a%mod*m%mod;
        if(a>=INF) a %= INF;
        return a;
    }
    }
}

Compiler output:
Main.java:33: error: cannot find symbol
        a = a*a%mod*m%mod;
                ^
  symbol:   variable mod
  location: class Main
Main.java:33: error: cannot find symbol
        a = a*a%mod*m%mod;
                      ^
  symbol:   variable mod
  location: class Main
2 errors
Language: C

#include <stdio.h>
#define M 1000000007
 
unsigned long long power(int m, int n) {
    unsigned long long x;
    if (n == 0) return 1;
    if (n % 2) {
        x = power(m, n-1);
        return (x * m) % M;
    }
    else {
        x = power(m, n/2);
        return (x * x) % M;
    }

 
int main() {
    int m, n, i;
    unsigned long long x;
 
    scanf("%d %d", &m, &n);
 
    printf("%llu\n", power(m, n));
 
    return 0;
}


Compiler output:
main.c: In function 'power':
main.c:26:1: error: expected declaration or statement at end of input
   26 | }
      | ^
Language: C

#include<stdio.h>
   
int main(){
   
int m,n,i;
float x=1;

scanf("%d %d\n", &m, &n); 

for(i=0,i<n,i++){
 x=x*m;
} 

printf("%d\n", 1000000007%x);
 
 
   
    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:10:16: error: expected ';' before ')' token
   10 | for(i=0,i<n,i++){
      |                ^
      |                ;
main.c:10:16: error: expected expression before ')' token
main.c:14:26: error: invalid operands to binary % (have 'int' and 'float')
   14 | printf("%d\n", 1000000007%x);
      |                          ^
Language: C

#include<stdio.h>
   
int main(){
   
int m,n,i;
float x=1;

scanf("%d %d\n", &m, &n); 

for(i=0;i<n;i++){
 x=x*m;
} 

printf("%d\n", 1000000007%x);
 
 
   
    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:14:26: error: invalid operands to binary % (have 'int' and 'float')
   14 | printf("%d\n", 1000000007%x);
      |                          ^
Language: C

#include<stdio.h>
   
int main(){
   
int m,n,i;
float x=1;

scanf("%d %d\n", &m, &n); 

for(i=0;i<n;i++){
 x=x*m;
} 

printf("%f\n", 1000000007%x);
 
 
   
    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:14:26: error: invalid operands to binary % (have 'int' and 'float')
   14 | printf("%f\n", 1000000007%x);
      |                          ^
Language: C

#include<stdio.h>
   
int main(){
   
int m,n,i;
double x=1;

scanf("%d %d\n", &m, &n); 

for(i=0;i<n;i++){
 x=x*m;
} 

printf("%d\n", x%1000000007);
   
    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:14:17: error: invalid operands to binary % (have 'double' and 'int')
   14 | printf("%d\n", x%1000000007);
      |                 ^
Language: C

#include<stdio.h>
   
int main(){
   
int m,n,i;
double x=1,y;

scanf("%d %d\n", &m, &n); 

for(i=0;i<n;i++){
 x=x*m;
} 
y=1000000007;
printf("%d\n", x%y);
   
    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:14:17: error: invalid operands to binary % (have 'double' and 'double')
   14 | printf("%d\n", x%y);
      |                 ^
Language: C

#include<stdio.h>
   
int main(){
   
int m,n,i;
double x=1,y;

scanf("%d %d\n", &m, &n); 

for(i=0;i<n;i++){
 x=x*m;
} 
y=1000000007;
printf("%f\n", x%y);
   
    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:14:17: error: invalid operands to binary % (have 'double' and 'double')
   14 | printf("%f\n", x%y);
      |                 ^
Language: C

#include<stdio.h>

long long int power(long long int x, long long n, long long int M) {
	long long int tmp = 1;

	if (n > 0) {
		tmp = power(x, n / 2, M);
		if (n % 2 == 0)tmp = (tmp * tmp) % M;
		else tmp = (((tmp * tmp) % M)*x) % M;
	}
	return tmp;
}

int main(void)
{
	long long int m, n;
	int i;
	scanf_s("%lld %lld", &m, &n);

	
	printf("%lld\n",(m,n,1000000007));
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:18:9: error: implicit declaration of function 'scanf_s'; did you mean 'scanf'? [-Wimplicit-function-declaration]
   18 |         scanf_s("%lld %lld", &m, &n);
      |         ^~~~~~~
      |         scanf
Language: C

#include <stdio.h>

unsigned long long int pow(int x,int y);

int main(){
 unsigned long long int m,n;

 scanf("%ulld %ulld",&m,&n);

 m=pow(m,n);

 printf("%ulld\n",m%1000000007);

 return 0;
}

unsigned long long int pow(unsigned long long int x,unsigned long long int y){
 if(y==0) return 1;

 unsigned long long int res;

 res=pow(x*x,n/2); // ????????§?????°

 if(n%2==1) res=res*x;
 return res;
 
}

Compiler output:
main.c:3:24: warning: conflicting types for built-in function 'pow'; expected 'double(double,  double)' [-Wbuiltin-declaration-mismatch]
    3 | unsigned long long int pow(int x,int y);
      |                        ^~~
main.c:2:1: note: 'pow' is declared in header '<math.h>'
    1 | #include <stdio.h>
  +++ |+#include <math.h>
    2 | 
main.c:17:24: error: conflicting types for 'pow'; have 'long long unsigned int(long long unsigned int,  long long unsigned int)'
   17 | unsigned long long int pow(unsigned long long int x,unsigned long long int y){
      |                        ^~~
main.c:3:24: note: previous declaration of 'pow' with type 'long long unsigned int(int,  int)'
    3 | unsigned long long int pow(int x,int y);
      |                        ^~~
main.c: In function 'pow':
main.c:22:14: error: 'n' undeclared (first use in this function)
   22 |  res=pow(x*x,n/2); // ????????§?????°
      |              ^
main.c:22:14: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include <stdio.h>

unsigned long long int Pow(int x,int y);

int main(){
 unsigned long long int m,n;

 scanf("%ulld %ulld",&m,&n);

 m=Pow(m,n);

 printf("%ulld\n",m%1000000007);

 return 0;
}

unsigned long long int Pow(unsigned long long int x,unsigned long long int y){
 if(y==0) return 1;

 unsigned long long int res;

 res=pow(x*x,n/2); // ????????§?????°

 if(n%2==1) res=res*x;
 return res;
 
}

Compiler output:
main.c:17:24: error: conflicting types for 'Pow'; have 'long long unsigned int(long long unsigned int,  long long unsigned int)'
   17 | unsigned long long int Pow(unsigned long long int x,unsigned long long int y){
      |                        ^~~
main.c:3:24: note: previous declaration of 'Pow' with type 'long long unsigned int(int,  int)'
    3 | unsigned long long int Pow(int x,int y);
      |                        ^~~
main.c: In function 'Pow':
main.c:22:6: error: implicit declaration of function 'pow' [-Wimplicit-function-declaration]
   22 |  res=pow(x*x,n/2); // ????????§?????°
      |      ^~~
main.c:2:1: note: include '<math.h>' or provide a declaration of 'pow'
    1 | #include <stdio.h>
  +++ |+#include <math.h>
    2 | 
main.c:22:6: warning: incompatible implicit declaration of built-in function 'pow' [-Wbuiltin-declaration-mismatch]
   22 |  res=pow(x*x,n/2); // ????????§?????°
      |      ^~~
main.c:22:6: note: include '<math.h>' or provide a declaration of 'pow'
main.c:22:14: error: 'n' undeclared (first use in this function)
   22 |  res=pow(x*x,n/2); // ????????§?????°
      |              ^
main.c:22:14: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include <stdio.h>

unsigned long long int EasyPow(int x,int y);

int main(){
 unsigned long long int m,n;

 scanf("%ulld %ulld",&m,&n);

 m=EasyPow(m,n);

 printf("%ulld\n",m%1000000007);

 return 0;
}

unsigned long long int EasyPow(unsigned long long int x,unsigned long long int y){
 if(y==0) return 1;

 unsigned long long int res;

 res=EasyPow(x*x,n/2); // ????????§?????°

 if(n%2==1) res=res*x;
 return res;
 
}

Compiler output:
main.c:17:24: error: conflicting types for 'EasyPow'; have 'long long unsigned int(long long unsigned int,  long long unsigned int)'
   17 | unsigned long long int EasyPow(unsigned long long int x,unsigned long long int y){
      |                        ^~~~~~~
main.c:3:24: note: previous declaration of 'EasyPow' with type 'long long unsigned int(int,  int)'
    3 | unsigned long long int EasyPow(int x,int y);
      |                        ^~~~~~~
main.c: In function 'EasyPow':
main.c:22:18: error: 'n' undeclared (first use in this function)
   22 |  res=EasyPow(x*x,n/2); // ????????§?????°
      |                  ^
main.c:22:18: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include <stdio.h>

unsigned long long int EasyPow(unsigned long long int x,unsigned long long int y);

int main(){
 unsigned long long int m,n;

 scanf("%ulld %ulld",&m,&n);

 m=EasyPow(m,n);

 printf("%ulld\n",m%1000000007);

 return 0;
}

unsigned long long int EasyPow(unsigned long long int x,unsigned long long int y){
 if(y==0) return 1;

 unsigned long long int res;

 res=EasyPow(x*x,n/2); // ????????§?????°

 if(n%2==1) res=res*x;
 return res;
 
}

Compiler output:
main.c: In function 'EasyPow':
main.c:22:18: error: 'n' undeclared (first use in this function)
   22 |  res=EasyPow(x*x,n/2); // ????????§?????°
      |                  ^
main.c:22:18: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include <stdio.h>

unsigned long long int res;
unsigned long long int EasyPow(unsigned long long int x,unsigned long long int y);

int main(){
 int m;
 unsigned long long int n;

 scanf("%d %ulld",&m,&n);

 printf("%ulld\n",EasyPow(m,n)%1000000007);

 return 0;
}

unsigned long long int EasyPow(int x,unsigned long long int y){
 if(y==0) return 1;

 res=EasyPow(x*x,y/2); // ????????§?????°

 if(y%2==1) res=res*x;
 return res;
 
}

Compiler output:
main.c:17:24: error: conflicting types for 'EasyPow'; have 'long long unsigned int(int,  long long unsigned int)'
   17 | unsigned long long int EasyPow(int x,unsigned long long int y){
      |                        ^~~~~~~
main.c:4:24: note: previous declaration of 'EasyPow' with type 'long long unsigned int(long long unsigned int,  long long unsigned int)'
    4 | unsigned long long int EasyPow(unsigned long long int x,unsigned long long int y);
      |                        ^~~~~~~
Language: C

#include <stdio.h>

long long int EasyPow(long long int x,long long int y,long long int z);

int main(){
 long long int m;
 long long int n;

 scanf("%lld %lld",&m,&n);

 printf("%lld\n",EasyPow(m,n,1000000007));

 return 0;
}

long long int EasyPow(long long int x,long long int y,long long int z){
 //if(y==0)return 1;
 long long int res=1;
 if(y>0){
 res=EasyPow(x,y/2,z); // ????????§?????°???y=0??????????????§
 
 //printf("[%u]\n",res);

 if(y%a2==0)res=(res*res)%z;
 else res=(((res*res)%z)*x)%z; // ????????????1*x?????????????????¨?????????
 }
 return res;
 
}

Compiler output:
main.c: In function 'EasyPow':
main.c:24:7: error: 'a2' undeclared (first use in this function)
   24 |  if(y%a2==0)res=(res*res)%z;
      |       ^~
main.c:24:7: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include <stdio.h>

long long int EasyPow(long long int x,long long int y,long long int z);

int main(){
 long long int m;
 long long int n;

 scanf("%lld %lld",&m,&n);

 printf("%lld\n",EasyPow(m,n,1000000007));

 return 0;
}

long long int EasyPow(long long int x,long long int y,long long int z){
 //if(y==0)return 1;
 long long int res=1;
 if(y>0){
 res=EasyPow(x,y/2,z); // ????????§?????°???y=0??????????????§
 
 //printf("[%u]\n",res);

 if(y%a==0)res=(res*res)%z;
 else res=(((res*res)%z)*x)%z; // ????????????1*x?????????????????¨?????????
 }
 return res;
 
}

Compiler output:
main.c: In function 'EasyPow':
main.c:24:7: error: 'a' undeclared (first use in this function)
   24 |  if(y%a==0)res=(res*res)%z;
      |       ^
main.c:24:7: note: each undeclared identifier is reported only once for each function it appears in
Language: C

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

long c;

int f(double m,double n){
double b = pow(m,n);
c = (int)b % 1000000007;
return c;
}

int main(void){
long m,n;
scanf("%d %d",&m,&n);
printf("%d\n",f(m,n));

return 0;

}


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

#include<stdio.h>
#define WARU 1000000007
typedef struct ull{
 long long num;
}ull;

int main(){
int m,n,i;
ull ans;
long long x;
ans.num=1;

scanf("%d %d",&m,&n);
x=m;

while(n>0){
 if((n & 1)==1){
   ans.num=(ans.num*x)%WARU;
   
 }
 
 x=(x*x)%WARU;
 n=n>>1;
}




Compiler output:
main.c: In function 'main':
main.c:24:1: error: expected declaration or statement at end of input
   24 | }
      | ^
Language: C

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.math.BigInteger;

public class Main {
	public static void main(String[] args) {
		BigInteger d = new BigInteger("1000000007");
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String a[] = null;
		try {
			a = br.readLine().split(" ");
		} catch (IOException e) {
			// TODO 自動生成された catch ブロック
			e.printStackTrace();
		}

		BigInteger n = new BigInteger(a[0]);
		n.pow(Integer.parseInt(a[1]));
		System.out.println(n.mod(d).toString());
	}

}

Compiler output:
main.c:1:1: error: unknown type name 'import'
    1 | import java.io.BufferedReader;
      | ^~~~~~
main.c:1:12: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token
    1 | import java.io.BufferedReader;
      |            ^
main.c:2:1: error: unknown type name 'import'
    2 | import java.io.IOException;
      | ^~~~~~
main.c:2:12: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token
    2 | import java.io.IOException;
      |            ^
main.c:3:1: error: unknown type name 'import'
    3 | import java.io.InputStreamReader;
      | ^~~~~~
main.c:3:12: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token
    3 | import java.io.InputStreamReader;
      |            ^
main.c:4:1: error: unknown type name 'import'
    4 | import java.math.BigInteger;
      | ^~~~~~
main.c:4:12: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token
    4 | import java.math.BigInteger;
      |            ^
main.c:6:1: error: unknown type name 'public'
    6 | public class Main {
      | ^~~~~~
main.c:6:14: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'Main'
    6 | public class Main {
      |              ^~~~
Language: C++

#include <iostream>

int main(){
    int64_t m,n,q = 1000000007;
    std::cin >> m >> n;

    in64_t r = m%q;
    for(int64_t i=1;i<n;i++)
    {
        r = r*r %q;
    }
    std::cout << r << "\n";
    return 0;
}




Compiler output:
a.cc: In function 'int main()':
a.cc:7:5: error: 'in64_t' was not declared in this scope; did you mean 'int64_t'?
    7 |     in64_t r = m%q;
      |     ^~~~~~
      |     int64_t
a.cc:10:9: error: 'r' was not declared in this scope
   10 |         r = r*r %q;
      |         ^
a.cc:12:18: error: 'r' was not declared in this scope
   12 |     std::cout << r << "\n";
      |                  ^
Language: C++

#include <iostream>

int main(){
    int64_t m,n,q = 1000000007;
    std::cin >> m >> n;

    int64_t r = 1;
    m2 = m*m;
    m4 = m*m*m*m;
    int64_t i = 0;
    for(;i<n/4;i++)
    {
        r = (r*m4) %q;
    }
    for(;i<n;i++)
    {
        r = (r*m) %q;
    }
    std::cout << r << "\n";
    return 0;
}




Compiler output:
a.cc: In function 'int main()':
a.cc:8:5: error: 'm2' was not declared in this scope; did you mean 'm'?
    8 |     m2 = m*m;
      |     ^~
      |     m
a.cc:9:5: error: 'm4' was not declared in this scope; did you mean 'm'?
    9 |     m4 = m*m*m*m;
      |     ^~
      |     m
Language: C++

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

const long M = 1000000007;

long power(long x, long n)
{
	long res;
	if (n == 0)
		return 1;
	double a = fmodl(double(x), double(M));
	a = fmodl(a*x, M);
	res = power(long(a), n / 2);
	if ((n & 1) != 0)
	{
		double b = fmodl(double(x), M);
		b = fmodl(res*b, M);
		res = long(b);
	}
	return res;
}
int main(){
	std::istream & c_in = cin;

	long m,n;
	c_in >> m >> n;
	cout << power(m,n) << endl;
}
#endif

Compiler output:
a.cc:33:2: error: #endif without #if
   33 | #endif
      |  ^~~~~
Language: C++

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

const long M = 1000000007;

long power(long x, long n)
{
	long res;
	if (n == 0)
		return 1;
	long double a = fmodl((long  double)x, (long  double)M);
	a = fmodl((long  double)a*x, (long  double)M);
	res = power(long(a), n / 2);

	if ((n & 1) != 0)
	{
		double b = fmodl((long  double)x, (long  double)M);
		b = fmodl(res*b, (long  double)M);
		res = long(b);
	}
	return res;
}
int main(){
	std::istream & c_in = cin;

	long m,n;
	c_in >> m >> n;
	cout << power(m,n) << endl;
}
#endif

Compiler output:
a.cc:34:2: error: #endif without #if
   34 | #endif
      |  ^~~~~
Language: C++

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

typedef __int64 Int;
const Int M = 1000000007;

Int power(Int x, Int n)
{
	Int res;
	if (n == 0)
		return 1;
	res = power((x * x) % M, n / 2);
	if ((n & 1) != 0)
	{
		res = res*x%M;
	}
	return res;
}
int main(){
	std::istream & c_in = cin;

	int m,n;
	c_in >> m >> n;
	cout << (int)power(m,n) << endl;
}

Compiler output:
a.cc:8:9: error: '__int64' does not name a type; did you mean '__int64_t'?
    8 | typedef __int64 Int;
      |         ^~~~~~~
      |         __int64_t
a.cc:9:7: error: 'Int' does not name a type; did you mean 'int'?
    9 | const Int M = 1000000007;
      |       ^~~
      |       int
a.cc:11:1: error: 'Int' does not name a type; did you mean 'int'?
   11 | Int power(Int x, Int n)
      | ^~~
      | int
a.cc: In function 'int main()':
a.cc:28:22: error: 'power' was not declared in this scope
   28 |         cout << (int)power(m,n) << endl;
      |                      ^~~~~
Language: C++

#inlcude<iostream>
using namespace std;

int main(){
    long a,b;
    long work;
    cin >> a >> b;
    for(int i = 0; i < b - 1; i++){
         a *= a;
    }
    cout << a;
    return 0;
}

Compiler output:
a.cc:1:2: error: invalid preprocessing directive #inlcude; did you mean #include?
    1 | #inlcude<iostream>
      |  ^~~~~~~
      |  include
a.cc: In function 'int main()':
a.cc:7:5: error: 'cin' was not declared in this scope
    7 |     cin >> a >> b;
      |     ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | #inlcude<iostream>
a.cc:11:5: error: 'cout' was not declared in this scope
   11 |     cout << a;
      |     ^~~~
a.cc:11:5: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
Language: C++

#include<iostream>
#include<cstdio>
#include<string>
#include<cmath>
using namespace std;
 long long p = 1000000007;
int main()
{
    long long a, b, c;
    cin >> a >> b;
    c = a;
    for (int i = 1; i < b; i++){
        a *= c;
    }
    cout << a%p << endl;

Compiler output:
a.cc: In function 'int main()':
a.cc:15:25: error: expected '}' at end of input
   15 |     cout << a%p << endl;
      |                         ^
a.cc:8:1: note: to match this '{'
    8 | {
      | ^
Language: C++

For given integers m and n, compute mn (mod 1,000,000,007). Here, A (mod M) is the remainder when A is divided by M.
For given integers m and n, compute mn (mod 1,000,000,007). Here, A (mod M) is the remainder when A is divided by M.

For given integers m and n, compute mn (mod 1,000,000,007). Here, A (mod M) is the remainder when A is divided by M.

Compiler output:
a.cc:1:1: error: 'For' does not name a type
    1 | For given integers m and n, compute mn (mod 1,000,000,007). Here, A (mod M) is the remainder when A is divided by M.
      | ^~~
Language: C++

#include<iostream>
#include<cmath>

using namespace std;
typedef ll  long long;

int main() {
	int m, n;
	cin >> m >> n;
	cout << (ll)powl(m, n)%1000000007 << endl;
}

Compiler output:
a.cc:5:9: error: 'll' does not name a type
    5 | typedef ll  long long;
      |         ^~
a.cc: In function 'int main()':
a.cc:10:18: error: 'll' was not declared in this scope
   10 |         cout << (ll)powl(m, n)%1000000007 << endl;
      |                  ^~
Language: C++

#include<iostream>

const long long mod=1000000007LL;

long long powmod(long long m,long long n){
	long long res=1;
	while(n>0){
		if(n&1)(res*=m)%=mod;
		n>>=1;
		(m*=m)%=mod;
	}
	return res;
}

int main()
{
    long long m,n;
    cin>>m>>n;
    cout<<powmod(m,n)<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:5: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
   18 |     cin>>m>>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:19:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   19 |     cout<<powmod(m,n)<<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:19:24: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   19 |     cout<<powmod(m,n)<<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 <iostream>
#include <algorithm>
#include <cmath>
#include <vector>

using namespace std;
typedef unsigned long long  ull;

ull power(ull m, ull n, ull r){
    ull tmp = 1;
    if(n > 0){
        tmp = power(m, n/2, r);
        if(n % 2 ==0) tmp =(tmp*tmp)%r;
        else tmp = (((tmp*tmp)%r)*n)%r;
      }
      return tmp;
    }
}

int main(){
	int m, n;
	cin >> m >> n;
    pos(m,n, 1000000007);
	return 0;
}

Compiler output:
a.cc:18:1: error: expected declaration before '}' token
   18 | }
      | ^
a.cc: In function 'int main()':
a.cc:23:5: error: 'pos' was not declared in this scope; did you mean 'pow'?
   23 |     pos(m,n, 1000000007);
      |     ^~~
      |     pow
Language: C++

#include <iostream>
#define P 1000000007
using namespace std;
typedef long long ll;
int mod_power(int,int);

int main(){
  int m,n;
  cin>>m>>n;
  cout<<mod_power(m,n)<<endl;
  return 0;
}

int mod_power(ll x,int y){
  ll res=1;
  for(int i=0;i<=30;i++){
    if(y&(1<<i)) res=res*x%P;
    x*=x%P;
  }
  return res%P;
}

Compiler output:
/usr/bin/ld: /tmp/ccVaP0JZ.o: in function `main':
a.cc:(.text+0x3b): undefined reference to `mod_power(int, int)'
collect2: error: ld returned 1 exit status
Language: C++

include <stdio.h>
include <stdio.h>
	int main(){
 	int S,h,m,s;
	cin>>S>>h>>m>>s;
	h=S/3600;
	m={S-(h*3600)}/60; 
	s=S-(h*3600+m*60);	
	cout<<h<<m<<s;endl;}

Compiler output:
a.cc:1:1: error: 'include' does not name a type
    1 | include <stdio.h>
      | ^~~~~~~
Language: C++

#include<iostream>
using namespace std;
#inlcude<cstdio>

int main()
{
    long long m, n;
    scanf("%d %d", &m, &n);
    
    long long x = m, y = n, z = 1;
    for( ; y; y >>= 1){
        if(y & 1){ z = (z * x) % 1000000007; }
        x = x * x;
    }
    printf("%d\n", z);

    return 0;
}

Compiler output:
a.cc:3:2: error: invalid preprocessing directive #inlcude; did you mean #include?
    3 | #inlcude<cstdio>
      |  ^~~~~~~
      |  include
Language: C++

#include<iostream>
using namespace std;
#inlcude<stdio.h>
 
int main()
{
    long long m, n;
    scanf("%d %d", &m, &n);
     
    long long x = m, y = n, z = 1;
    for( ; y; y >>= 1){
        if(y & 1){ z = (z * x) % 1000000007; }
        x = x * x;
    }
    printf("%d\n", z);
 
    return 0;
}

Compiler output:
a.cc:3:2: error: invalid preprocessing directive #inlcude; did you mean #include?
    3 | #inlcude<stdio.h>
      |  ^~~~~~~
      |  include
Language: C++

#include<iostream>
using namespace std;
#inlcude<stdio.h>
  
int main()
{
    int m, n;
    scanf("%d %d", &m, &n);
      
    long long x = m, y = n, z = 1;
    for( ; y; y >>= 1){
        if(y & 1){ z = (z * x) % 1000000007; }
        x = x * x;
    }
    printf("%lld\n", z);
  
    return 0;
}
 

Compiler output:
a.cc:3:2: error: invalid preprocessing directive #inlcude; did you mean #include?
    3 | #inlcude<stdio.h>
      |  ^~~~~~~
      |  include
Language: C++

#include <iostream>
#include <algorithm>
#include <vector>
#include <math.h>
using namespace std;

int main(){
    int m,n;
    long long ans1=1,ans2=1,ans=1;
    int div=1000000007;
    while(cin >> m >> n){
    for(int i=0;i<50;i++){
        ans1 *= m;
        if(ans1>div) ans1 = ans1%div;
    }
    for(int j=0;j<n%50;j++){
        ans2 *= m;
        if(ans2>div) ans2 = ans2%div;
    }
    for(int k=0;k<n/50;k++){
        ans *= ans1;
        if(ans>div) ans = ans%div;
    }
    ans *= ans2
    cout << ans << endl;
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:24:16: error: expected ';' before 'cout'
   24 |     ans *= ans2
      |                ^
      |                ;
   25 |     cout << ans << endl;
      |     ~~~~
Language: C++

#include<stdio.h>
#define DIV 1000000007

typedef unsigned long long int verylong

verylong mod(verylong m,int n){
    verylong x,y=0,z=0,i,j;
    /*printf("mod(%d,%d): called\n",m,n);*/
    if(n==0){
        return 1;
    }else if(n==1){
        return m;
    }else{
        if(m>DIV-m)m=DIV-m;
        for(i=0;i<m;i++){/*????????¢???????????§???????????????????????§?????????*/
            y+=m;
            if(y>DIV)y=y%DIV;
        }
        x = mod(y,n/2)%DIV;
        if(n%2==0){
            return x;
        }else{
            for(j=0;j<m;j++){
               z+=x;
               if(z>DIV)z=z%DIV;
            }
            return z;
        }
    }
}

int main(){
    int m;
    int n;
    scanf("%d %d",&m,&n);
    printf("%d\n",mod(m,n));
}

Compiler output:
a.cc:6:1: error: expected initializer before 'verylong'
    6 | verylong mod(verylong m,int n){
      | ^~~~~~~~
a.cc: In function 'int main()':
a.cc:36:19: error: 'mod' was not declared in this scope
   36 |     printf("%d\n",mod(m,n));
      |                   ^~~
Language: C++

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

long pow(long long x,long long n) {
  if (n == 0)
    return 1;
  else if (n % 2 == 0)
    return (pow(x % M * x % M, n/2)% M);
  else if (n % 2 != 0)
    return (pow(x % M * x % M,n/2)) % M * x % M);
}

int main() {
  long long m,n;
  cin >> m >> n;
  cout << pow(m,n) % M << endl;
}

Compiler output:
a.cc: In function 'long int pow(long long int, long long int)':
a.cc:11:48: error: expected ';' before ')' token
   11 |     return (pow(x % M * x % M,n/2)) % M * x % M);
      |                                                ^
a.cc:11:48: error: expected primary-expression before ')' token
a.cc:12:1: warning: control reaches end of non-void function [-Wreturn-type]
   12 | }
      | ^
Language: C++

#include <iostream>

using namespace std;

int div(int a, int b, int p)
{
    return ((a%p)*(b%p))%p;
}


int main() {
    const int p = 1000000007;
    int m,n,ans = 0;
    cin >> m >> n;
    int size = (int)log2(n);
    int rem = m;
    for(int i = 0; i < size; i++)
    {
        rem = div(rem,rem,p);
    }
    ans = div(rem,(int)pow(m,n - pow(2,size)),p);
    cout << ans << endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:21: error: 'log2' was not declared in this scope
   15 |     int size = (int)log2(n);
      |                     ^~~~
a.cc:21:34: error: 'pow' was not declared in this scope
   21 |     ans = div(rem,(int)pow(m,n - pow(2,size)),p);
      |                                  ^~~
a.cc:21:24: error: 'pow' was not declared in this scope
   21 |     ans = div(rem,(int)pow(m,n - pow(2,size)),p);
      |                        ^~~
Language: C++

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

typedef long long ll;

ll mypow(ll b, ll e, ll mod) {
    if( e == 0 ) return 1;
    if( e%2 == 0 )
	return mypow(b*b, e/2) % mod;
    else
	return b * mypow(b*b, e/2) % mod;
}


int main () {

ll m,n;
cin >> m >> n;
ll ans =mypow(m,n,1000000007);
    cout << ans << endl;
    return 0;
}

Compiler output:
a.cc: In function 'll mypow(ll, ll, ll)':
a.cc:9:21: error: too few arguments to function 'll mypow(ll, ll, ll)'
    9 |         return mypow(b*b, e/2) % mod;
      |                ~~~~~^~~~~~~~~~
a.cc:6:4: note: declared here
    6 | ll mypow(ll b, ll e, ll mod) {
      |    ^~~~~
a.cc:11:25: error: too few arguments to function 'll mypow(ll, ll, ll)'
   11 |         return b * mypow(b*b, e/2) % mod;
      |                    ~~~~~^~~~~~~~~~
a.cc:6:4: note: declared here
    6 | ll mypow(ll b, ll e, ll mod) {
      |    ^~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
typedef long long ll;
 
ll mypow(ll b, ll e, ll mod) {
    if( e == 0 ) return 1;
    if( e%2 == 0 )
    return mypow(b*b, e/2,mod) % mod;
    else
    return b * mypow(b*b, e/2,mod) % mod;
}
 
 
int main () {
 
ll m,n;
cin >> m >> n;
ll ans =mypow(m,n,1000000007);
    cout << ans %mod<< endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:20:18: error: 'mod' was not declared in this scope; did you mean 'modf'?
   20 |     cout << ans %mod<< endl;
      |                  ^~~
      |                  modf
Language: C++

#include <iostream>
int modpow(int x, int e, int n) {
  int res = 1;
  while (e > 0) {
    if (e % 2 == 1) {
      res = res * x % n;
    }
    e /= 2;
    x = x * x % n;
  }
  return res;
}
int main() {
  int m, n;
  cin >> m >> n;
  cout << modpow(m, n, 1000000007);
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
   15 |   cin >> m >> 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:16:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   16 |   cout << modpow(m, n, 1000000007);
      |   ^~~~
      |   std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
Language: C++

import java.util.*;
import java.lang.*;
import java.io.*;

class Program {
	public static int modpow(int a, int b, int m) {
		int ret = 1;
		while(b > 0) {
			if((b & 1) == 1) ret = (int)((long)ret * a % m);
			a = (int)((long)a * a % m);
			b >>= 1;
		}
		return ret;
	}
	public static void main (String[] args) {
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt(), b = sc.nextInt();
		System.out.println(modpow(a, b, 1000000007));
	}
}

Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import java.util.*;
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:2:1: error: 'import' does not name a type
    2 | import java.lang.*;
      | ^~~~~~
a.cc:2:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:3:1: error: 'import' does not name a type
    3 | import java.io.*;
      | ^~~~~~
a.cc:3:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:6:15: error: expected ':' before 'static'
    6 |         public static int modpow(int a, int b, int m) {
      |               ^~~~~~~
      |               :
a.cc:15:15: error: expected ':' before 'static'
   15 |         public static void main (String[] args) {
      |               ^~~~~~~
      |               :
a.cc:15:34: error: 'String' has not been declared
   15 |         public static void main (String[] args) {
      |                                  ^~~~~~
a.cc:15:43: error: expected ',' or '...' before 'args'
   15 |         public static void main (String[] args) {
      |                                           ^~~~
a.cc:20:2: error: expected ';' after class definition
   20 | }
      |  ^
      |  ;
a.cc: In static member function 'static void Program::main(int*)':
a.cc:16:17: error: 'Scanner' was not declared in this scope
   16 |                 Scanner sc = new Scanner(System.in);
      |                 ^~~~~~~
a.cc:17:25: error: 'sc' was not declared in this scope
   17 |                 int a = sc.nextInt(), b = sc.nextInt();
      |                         ^~
a.cc:18:17: error: 'System' was not declared in this scope
   18 |                 System.out.println(modpow(a, b, 1000000007));
      |                 ^~~~~~
a.cc:18:46: error: 'b' was not declared in this scope
   18 |                 System.out.println(modpow(a, b, 1000000007));
      |                                              ^
Language: C++

include <bits/stdc++.h>
#define ll long long
#define INF 1000000005
#define MOD 1000000007
#define rep(i,n) for(int i=0;i<n;++i)

using namespace std;

typedef pair<int,int>P;

const int MAX_N = 100005;

int m,n;

int main()
{
	scanf("%d%d",&m,&n);
	int ans=1;
	while(n > 0){
		if(n & 1){
			ans = (ll)ans * m % MOD;
		}
		m = (ll)m*m%MOD;
		n >>= 1;
	}
	printf("%d\n",ans);
	return 0;
}

Compiler output:
a.cc:1:1: error: 'include' does not name a type
    1 | include <bits/stdc++.h>
      | ^~~~~~~
a.cc:9:9: error: 'pair' does not name a type
    9 | typedef pair<int,int>P;
      |         ^~~~
a.cc: In function 'int main()':
a.cc:17:9: error: 'scanf' was not declared in this scope
   17 |         scanf("%d%d",&m,&n);
      |         ^~~~~
a.cc:26:9: error: 'printf' was not declared in this scope
   26 |         printf("%d\n",ans);
      |         ^~~~~~
a.cc:1:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
  +++ |+#include <cstdio>
    1 | include <bits/stdc++.h>
Language: C++

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

int main(){
double n,m;
long long P;
cin >>m >>n;
P=long long(pow(m,n));
cout <<P <<endl;
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:3: error: expected primary-expression before 'long'
   10 | P=long long(pow(m,n));
      |   ^~~~
Language: C++

#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <cmath>
#include <cassert>
#define FOR(i,a,b) for(int i=(a);i<(b);i++)
#define REP(i,n) FOR(i,0,n)
#define rep(i,n) FOR(i,0,n)
#define DEBUG(x) cout<<#x<<": "<<x<<endl
#define vint vector<int>
#define vdouble vector<double>
#define vstring vector<string>
using namespace std;

#include<map>
#include<set>
#include<queue>

typedef long long ll;
typedef unsigned long long ull;

const int MAX_N = 1000000;
const int INFTY = (1 << 21); // 2097152
// const ll INFTY = (1LL << 60);
const ll MD = 1000000007LL;

ll A, B;

// repeat square - (x ** n) % M
ll power(ll x, ll n, ll M){
	ll tmp = 1;

	if (n > 0){
		tmp = power(x, n/2, M);
		if ( n%2 == 0 ) tmp = (tmp*tmp)%M;
		else tmp = (((tmp*tmp)%M)*x)%M;
	}
	return tmp;
}

int main() {
	cin >> A >> B;
	cout << power(X, N, MD) << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:44:23: error: 'X' was not declared in this scope
   44 |         cout << power(X, N, MD) << endl;
      |                       ^
a.cc:44:26: error: 'N' was not declared in this scope
   44 |         cout << power(X, N, MD) << endl;
      |                          ^
Language: C++

#include<iostream>
using namespace std;
typedef unsigned long long ullong;

ullong(ullong x,ullong n,ullong M)
{
	if(n==0)return 1;
	ullong res=power(m*m%M,n/2,M);
	if(n%2==1)res=res*x%M;
	return res;
}

int main()
{
	ullong x,n;
	cin>>x>>n;
	cout<<power(x,n,1000000007)<<endl;
	return 0;
}

Compiler output:
a.cc:5:14: error: expected ')' before 'x'
    5 | ullong(ullong x,ullong n,ullong M)
      |       ~      ^~
      |              )
a.cc: In function 'int main()':
a.cc:17:15: error: 'power' was not declared in this scope
   17 |         cout<<power(x,n,1000000007)<<endl;
      |               ^~~~~
Language: C++

#include<iostream>
using namespace std;
typedef unsigned long long ullong;

ullong power(ullong x,ullong n,ullong M)
{
	if(n==0)return 1;
	ullong res=power(m*m%M,n/2,M);
	if(n%2==1)res=res*x%M;
	return res;
}

int main()
{
	ullong x,n;
	cin>>x>>n;
	cout<<power(x,n,1000000007)<<endl;
	return 0;
}

Compiler output:
a.cc: In function 'ullong power(ullong, ullong, ullong)':
a.cc:8:26: error: 'm' was not declared in this scope
    8 |         ullong res=power(m*m%M,n/2,M);
      |                          ^
Language: C++

#include "bits/stdc++.h"
#define REP(i,n) for(int i=0;i<n;i++)
#define ALL(v) v.begin(),v.end()
#define PB push_back
#define MP make_pair
using namespace std;
int main(){
    vector<int>S,T;
    int a,n,q;
    cin>>n;
    REP(i,n){cin>>a;S.PB(a);}
    cin>>q;
    REP(i,q){cin>>a;T.PB(a);}
    sort(ALL(S));
    sort(ALL(T));
    int cnt=0;
    if(binary_search(ALL(S),T[i]))cnt++;
    cout<<cnt<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:31: error: 'i' was not declared in this scope
   17 |     if(binary_search(ALL(S),T[i]))cnt++;
      |                               ^
Language: C++

#include<cstdio>
#include<math.h >
#define MOD 1000000007
using namespace std;
long long pos(int m,int n)
{
	if(n==0) return 1;
	long long ans=pow(m*m%MOD,n/2);
	if(n%2==1) ans=ans*m%MOD;
	return ans;
}
int main()
{
	int m,n,i,j;
	scanf("%d%d",&m,&n);
	printf("%lld\n",pos(m,n));
	
}

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

#include<cstdio>
#include<math.h>
#define MOD 1000000007
using namespace std;
int pos(int m,int n)
{
	if(n==0) return 1;
	int x=pos(m,n/2);
	ans=x*x%MOD;
	if(n%2==1) ans=ans*m%MOD;
	return ans;
}
int main()
{
	int m,n,i,j;
	scanf("%d%d",&m,&n);
	printf("%d\n",pos(m,n));
	
}

Compiler output:
a.cc: In function 'int pos(int, int)':
a.cc:9:9: error: 'ans' was not declared in this scope; did you mean 'abs'?
    9 |         ans=x*x%MOD;
      |         ^~~
      |         abs
Language: C++

    #include<stdio.h> 
    using namespace std; 
    long long c=1000000007;
    long long  PowerMod(long long  a, long long  b) 
{
    long long  ans = 1;
    a = a % c;
    while(b>0)
    {
    if(b % 2 == 1)
    ans = (ans * a) % c;
    b = b/2;
    a = (a * a) % c;
    }
    return ans;
}
    int main(){ 
 
       long long   x,n; 
       scanf("%lld%lld",&x,&n); 
       printf("%lld\n",mi(x,n)); 
      return 0; 
    }  


Compiler output:
a.cc: In function 'int main()':
a.cc:21:24: error: 'mi' was not declared in this scope
   21 |        printf("%lld\n",mi(x,n));
      |                        ^~
Language: C++

#include<iostream>
#include<cstdlib>
#include<cmath>
using namespace std;
typedef long long llong;
typedef unsigned long long ullong;

llong mod_pow(ullong x, ullong n, ullong mod) {
  ullong ans = 1;
  while ( n > 0) {
    if ( n & 1 ) res = res * x % mod;
    x = x * x % mod;
    n >>= 1;
  }
  return ans;
}

int main() {
  ullong m, n;
  cin >> m >> n;
  cout << mod_pow(m, n, 1000000007) << endl;

  return 0;
}


Compiler output:
a.cc: In function 'llong mod_pow(ullong, ullong, ullong)':
a.cc:11:18: error: 'res' was not declared in this scope
   11 |     if ( n & 1 ) res = res * x % mod;
      |                  ^~~
Language: C++

#include<iostream>
#include<cstdlib>
#include<cmath>
using namespace std;
typedef long long llong;
typedef unsigned long long ullong;

llong mod_pow(ullong x, ullong n, ullong mod) {
  ullong res = 1;
  while ( n > 0) {
    if ( n & 1 ) res = res * x % mod;
    x = x * x % mod;
    n >>= 1;
  }
  return ans;
}

int main() {
  ullong m, n;
  cin >> m >> n;
  cout << mod_pow(m, n, 1000000007) << endl;

  return 0;
}


Compiler output:
a.cc: In function 'llong mod_pow(ullong, ullong, ullong)':
a.cc:15:10: error: 'ans' was not declared in this scope; did you mean 'abs'?
   15 |   return ans;
      |          ^~~
      |          abs
Language: C++

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


Compiler output:
a.cc: In function 'int main()':
a.cc:8:9: error: 'cin' was not declared in this scope
    8 |         cin >> m >> n;
      |         ^~~
a.cc:4:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    3 | #include <string>
  +++ |+#include <iostream>
    4 | using namespace std;
a.cc:13:9: error: 'cout' was not declared in this scope
   13 |         cout << ans << endl;
      |         ^~~~
a.cc:13:9: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:13:24: error: 'endl' was not declared in this scope
   13 |         cout << ans << endl;
      |                        ^~~~
a.cc:4:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
    3 | #include <string>
  +++ |+#include <ostream>
    4 | using namespace std;