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

#include <iostream> 
#include <math.h>  
using namespace std; 
  
// function to print number of 
// digits 
void fnd(long n, int base) 
{ 
r and then  
    // adding 1. 
    int dig = (int)(floor( log(n) /  
                         log(base)) + 1);  
      
    // printing output 
    cout << "The Number of digits of "
         << "Number " << n << " in base "
         << base << " is " << dig; 
} 
 
int main() 
{ 
    long n ;cin>>n; 
    int k;cin>>k; 
    fnd(n, k); 
    return 0; 
} 

Compiler output:
a.cc: In function 'void fnd(long int, int)':
a.cc:9:1: error: 'r' was not declared in this scope
    9 | r and then
      | ^
a.cc:9:7: error: 'then' was not declared in this scope
    9 | r and then
      |       ^~~~
a.cc:17:31: error: 'dig' was not declared in this scope; did you mean 'div'?
   17 |          << base << " is " << dig;
      |                               ^~~
      |                               div
Language: Java

import java.util.*;

public class Main {
    final static int MOD = 1000000007;
    
    public static void main(String[] args) {
        MyScanner in = new MyScanner();
        int n = in.nextInt();
        int k = in.nextInt();
        String str = Integer.toString(k,i);
        System.out.println(str);
        
        
    }
    
    static class MyScanner {
        static Scanner sc = new Scanner(System.in);
        
        String next() {
            return sc.next();
        }
        
        String nextLine() {
            return sc.nextLine();
        }
        
        int nextInt() {
            return Integer.parseInt(sc.next());
        }
        
        double nextDouble() {
            return Double.parseDouble(next());
        }
        
        long nextLong() {
            return Long.parseLong(next());
        }
        
        int[] nextIntArray(int n) {
            int[] array = new int[n];
            for (int i = 0; i < n; i++) {
                array[i] = nextInt();
            }
            return array;
        }
        
        double[] nextDoubleArray(int n) {
            double[] array = new double[n];
            for (int i = 0; i < n; i++) {
                array[i] = nextDouble();
            }
            return array;
        }
        
        long[] nextLongArray(int n) {
            long[] array = new long[n];
            for (int i = 0; i < n; i++) {
                array[i] = nextLong();
            }
            return array;
        }
        
        String[] nextLineArray(int n) {
            String[] array = new String[n];
            for (int i = 0; i < n; i++) {
                array[i] = nextLine();
            }
            return array;
        }
        
        int[][] nextIntMatrix(int n, int m) {
            int[][] matrix = new int[n][m];
            for (int i = 0; i < n; i++) {
                for (int j = 0; j < m; j++) {
                    matrix[i][j] = nextInt();
                }
            }
            return matrix;
        }
        
        double[][] nextDoubleMatrix(int n, int m) {
            double[][] matrix = new double[n][m];
            for (int i = 0; i < n; i++) {
                for (int j = 0; j < m; j++) {
                    matrix[i][j] = nextDouble();
                }
            }
            return matrix;
        }
        
        long[][] nextLongMatrix(int n, int m) {
            long[][] matrix = new long[n][m];
            for (int i = 0; i < n; i++) {
                for (int j = 0; j < m; j++) {
                    matrix[i][j] = nextLong();
                }
            }
            return matrix;
        }
    }
}

Compiler output:
Main.java:10: error: cannot find symbol
        String str = Integer.toString(k,i);
                                        ^
  symbol:   variable i
  location: class Main
1 error
Language: C++

#include <iostream>
#include <regex>
#include <locale>
 
using namespace std;
 
int main() {
  vector<int> vec;
  int n, k;
  cin >> n >> k;
  // while(n < k) {
  //   vec.push_back(n % k);
  //   n /= k;
  // }
  // reverse(vec);
  // for
  int digit;
  for(digit = 1; n >= pow(k, digit); digit++) {} 
  cout << digit;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:23: error: 'pow' was not declared in this scope
   18 |   for(digit = 1; n >= pow(k, digit); digit++) {}
      |                       ^~~
Language: C++

#include<bits/stdc++.h>
2 using namespace std;
3
4 int main() {
5 int n, k;
6 cin >> n >> k;
7 int c = 0
  while(n){
    n/=k;
    c++;
    }
  cout<<c<<endl;
  
  
  
  
  return 0;
}

Compiler output:
a.cc:2:1: error: expected unqualified-id before numeric constant
    2 | 2 using namespace std;
      | ^
a.cc:3:1: error: expected unqualified-id before numeric constant
    3 | 3
      | ^
Language: C++

#include <iostream>
int main(){
  int N,K;
  int count=0;
  std::cin>>N;
  std::cin>>K;
  for(int i=0;i<N;i++){
    if (N>pow(K,i)){
      count++;
    }
  }
  std::cout<<count;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:11: error: 'pow' was not declared in this scope
    8 |     if (N>pow(K,i)){
      |           ^~~
Language: C++

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

using namespace std;

void A_Beginner(void) {

	int N, R;
	cin >> N >> R;
	cout << ((N >= 10) ? R : R + 100 * (10 - N));
	return;
}

void B_Digits(void) {

	int N, K;
	cin >> N >> K;

	for (int loop = 0; loop < 40; loop++) {
		if (N < (int)pow(K, loop)) {
			cout << loop << flush;
			return;
		}
	}
	return;
}

int main(void) {

	//A_Beginner();
	B_Digits();
	return 0;
}

Compiler output:
a.cc: In function 'void B_Digits()':
a.cc:22:30: error: 'pow' was not declared in this scope
   22 |                 if (N < (int)pow(K, loop)) {
      |                              ^~~
Language: C++

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

using namespace std;

void A_Beginner(void) {

	int N, R;
	cin >> N >> R;
	cout << ((N >= 10) ? R : R + 100 * (10 - N));
	return;
}

void B_Digits(void) {

	int N, K;
	cin >> N >> K;

	for (int loop = 0; loop < 40; loop++) {
		if (N < (int)pow(K, loop)) {
			cout << loop << flush;
			return;
		}
	}
	return;
}

int main(void) {

	//A_Beginner();
	B_Digits();
	return 0;
}


Compiler output:
a.cc: In function 'void B_Digits()':
a.cc:22:30: error: 'pow' was not declared in this scope
   22 |                 if (N < (int)pow(K, loop)) {
      |                              ^~~
Language: C++

int main() {
  int n,k;
  cin>>n>>k;
  int ans=1;
  int b=1;
  for(int i=0;i<10000;i++){
    for(int j=0;j<ans-1;j++){
      b*=k;
    }
    if(b<=n&&n<=(b*k)-1){
      cout<<ans<<endl;
      break;
    }
    b=1;
    ans++;
  }
  cout<<ans<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:3:3: error: 'cin' was not declared in this scope
    3 |   cin>>n>>k;
      |   ^~~
a.cc:11:7: error: 'cout' was not declared in this scope
   11 |       cout<<ans<<endl;
      |       ^~~~
a.cc:11:18: error: 'endl' was not declared in this scope
   11 |       cout<<ans<<endl;
      |                  ^~~~
a.cc:17:3: error: 'cout' was not declared in this scope
   17 |   cout<<ans<<endl;
      |   ^~~~
a.cc:17:14: error: 'endl' was not declared in this scope
   17 |   cout<<ans<<endl;
      |              ^~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int n,k;
  cin>>n>>k;
  int ans=1;
  int b=1;
  for(int i=0;i<11;i++){
    for(int j=0;j<ans-1;j++){
      b*=k;
    }
    if(b<=n&&n<=(b*k)-1){
      cout<<ans<<endl;
      fin=true;
      break;
    }
    ans++;
  }
  cout<<ans<<endl;
}
    
    
    
    

Compiler output:
a.cc: In function 'int main()':
a.cc:15:7: error: 'fin' was not declared in this scope; did you mean 'sin'?
   15 |       fin=true;
      |       ^~~
      |       sin
Language: C++

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

int main(){
 int n, k;
 cin >> n >> k;
 int ans = 0;
 //vector<int> d;
 while(n > 0) {
   //d.pushback(n%k);
   n /= k;
   ans++;
 }
  cout << ans << endl;
}
   


Compiler output:
a.cc:4:7: error: expected nested-name-specifier before numeric constant
    4 | using 11 = Long Long;
      |       ^~
Language: C++

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

int main() {
  int N, K;
  cin >> N >> R;
  int count = 1;
  while (N > 1){
    N /= K;
    count++;
  }
  cout << count << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:6:15: error: 'R' was not declared in this scope
    6 |   cin >> N >> R;
      |               ^
Language: C

 #include<conio.h>
 #include<stdio.h>
  int main()

  {
      int b,n,i,r,digit,p,count=0,q,num=0;
      char a[100];
     scanf("%d",&n);
    scanf("%d",&b);
     p=n;
      do
    {
        r=p%b;
        digit='0'+r;
        if(digit>'9')
            digit=digit+7;
        a[count]=digit;
        count++;
        p=p/b;
         } while(p!=0);
      for(i=count-1;i>=0;--i)
      {
          while(a[i]!=0)
          {
              a[i]=a[i]/10;
              num++;
          }
      }
      printf("%d",num/2);
      return 0;
  }


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

 #include<conio.h>
 #include<stdio.h>
  int main()

  {
      int b,n,i,r,digit,p,count=0,q,num=0;
      char a[100];
     scanf("%d",&n);
    scanf("%d",&b);
     p=n;
      do
    {
        r=p%b;
        digit='0'+r;
        if(digit>'9')
            digit=digit+7;
        a[count]=digit;
        count++;
        p=p/b;
         } while(p!=0);
      for(i=count-1;i>=0;--i)
      {
          while(a[i]!=0)
          {
              a[i]=a[i]/10;
              num++;
          }
      }
      printf("%d",num/2);
      return 0;
  }


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

import java.util.Scanner;

public class Digit {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int K = sc.nextInt();

        int digit = 1;
        int num = N;
        while((num /= K) != 0) digit++;

        System.out.println(digit);
    }
}

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

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

int main(){
 int n, k;
 cin >> n >> k;
 int ans = 0;
 //vector<int> d;
 while(n > 0) {
   //d.pushback(n%k);
   n /= k;
   ans++;
 }
  cout << ans << endl;
}
   

Compiler output:
a.cc:4:7: error: expected nested-name-specifier before numeric constant
    4 | using 11 = Long Long;
      |       ^~
Language: C++

#include <stdio.h>
#include <math.h>
#include <stdlib.h>
long long int myfun(a,x);
int main()
{
    long long int n,k,ans;
    scanf("%lld %lld", &n,&k);
    ans=ceil(myfun(n,k));
    printf("%lld", ans+1);
    return 0;
}
long long int myfun(long long int n,long long int k)
{
    return log(n)/log(k);
}


Compiler output:
a.cc:4:21: error: 'a' was not declared in this scope
    4 | long long int myfun(a,x);
      |                     ^
a.cc:4:23: error: 'x' was not declared in this scope
    4 | long long int myfun(a,x);
      |                       ^
a.cc:4:24: error: expression list treated as compound expression in initializer [-fpermissive]
    4 | long long int myfun(a,x);
      |                        ^
a.cc: In function 'int main()':
a.cc:9:19: error: 'myfun' cannot be used as a function
    9 |     ans=ceil(myfun(n,k));
      |              ~~~~~^~~~~
a.cc: At global scope:
a.cc:13:52: error: 'long long int myfun(long long int, long long int)' redeclared as different kind of entity
   13 | long long int myfun(long long int n,long long int k)
      |                                                    ^
a.cc:4:15: note: previous declaration 'long long int myfun'
    4 | long long int myfun(a,x);
      |               ^~~~~
Language: C

#include <stdio.h>

int main() {
	int num, k, count = 0;
	scanf("%d %d", &n, &k);
	while (num != 0){
		num = num / k;
		count++;
	}
	printf("%d\n", count);
}

Compiler output:
main.c: In function 'main':
main.c:5:25: error: 'n' undeclared (first use in this function)
    5 |         scanf("%d %d", &n, &k);
      |                         ^
main.c:5:25: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include <stdio.h>

int main() {
	int num, k, count = 0;
	scanf("%d %d", &n, &k);
	while (num != 0){
		n = n / k;
		count++;
	}
	printf("%d\n", count);
}

Compiler output:
main.c: In function 'main':
main.c:5:25: error: 'n' undeclared (first use in this function)
    5 |         scanf("%d %d", &n, &k);
      |                         ^
main.c:5:25: note: each undeclared identifier is reported only once for each function it appears in
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  int n,k;
  cin>>n>>k;
 for(int i=0;i<n;i++){
   if(pow(k,i)<=n&&n<pow(k,i+1)){
     cout<<i+1;
     break;
   }
 }
  return 0;

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

import java.util.Scanner;
public class Main{
public static void main(String[] args){
  Scanner scan = new Scanner(System.in);
  int n = scan.nextInt();
  int k = scan.nextInt();
  int x = 0;
  
  while( n > k ^ x){
    x ++;
  }
  
  System.out.println(x-1);
}
}

Compiler output:
Main.java:9: error: bad operand types for binary operator '^'
  while( n > k ^ x){
               ^
  first type:  boolean
  second type: int
1 error
Language: Java

import java.util.Scanner;
public static void main(String[] args){
  Scanner scan = new Scanner(System.in);
  int n = scan.nextInt();
  int k = scan.nextInt();
  int x = 0;
  
  while( n > k ^ x){
    x ++;
  }
  
  System.out.println(x-1);
}

Compiler output:
Main.java:2: error: unnamed classes are a preview feature and are disabled by default.
public static void main(String[] args){
              ^
  (use --enable-preview to enable unnamed classes)
1 error
Language: Java

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

public class Main
{
	public static void main(String[] args) throws Exception
	{
		Reader reader = new Reader();
      	int n = reader.nextInt();
      	int k = reader.nextInt();
		OutputStream out = new BufferedOutputStream(System.out);
		out.write((fromDeci(k, n).length()).getBytes());
		out.flush();
	}
    static char reVal(int num) 
    { 
        if (num >= 0 && num <= 9) 
            return (char)(num + 48); 
        else
            return (char)(num - 10 + 65); 
    } 

    // Function to convert a given decimal number 
    // to a base 'base' and 
    static String fromDeci(int base1, int inputNum) 
    { 
        String s = ""; 

        // Convert input number is given 
        // base by repeatedly dividing it 
        // by base and taking remainder 
        while (inputNum > 0) 
        { 
            s += reVal(inputNum % base1); 
            inputNum /= base1; 
        } 
        StringBuilder ix = new StringBuilder(); 

            // append a string into StringBuilder input1 
            ix.append(s); 

        // Reverse the result 
        return new String(ix.reverse()); 
    } 

	static class Reader {
        final private int BUFFER_SIZE = 1 << 16;
        private DataInputStream din;
        private byte[] buffer;
        private int bufferPointer, bytesRead;
        public Reader() {
            din = new DataInputStream(System.in);
            buffer = new byte[BUFFER_SIZE];
            bufferPointer = bytesRead = 0;
        }
        public int nextInt() throws IOException {
            int ret = 0;
            byte c = read();
            while (c <= ' ') {
                c = read();
            }
            do {
                ret = ret * 10 + c - '0';
            } while ((c = read()) >= '0' && c <= '9');
            return ret;
        }
        public long nextLong() throws IOException {
            long ret = 0;
            byte c = read();
            while (c <= ' ') {
                c = read();
            }
            do {
                ret = ret * 10 + c - '0';
            } while ((c = read()) >= '0' && c <= '9');
            return ret;
        }

        private void fillBuffer() throws IOException
        {
            bytesRead = din.read(buffer, bufferPointer = 0, BUFFER_SIZE);
            if (bytesRead == -1) {
                buffer[0] = -1;
            }
        }

        private byte read() throws IOException
        {
            if (bufferPointer == bytesRead) {
                fillBuffer();
            }
            return buffer[bufferPointer++];
        }
    }
}


Compiler output:
Main.java:13: error: int cannot be dereferenced
		out.write((fromDeci(k, n).length()).getBytes());
		                                   ^
1 error
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 K = sc.nextInt();
    
   int count = 0;
   while(N>0)
   {
     N /= K ;
     count++;
   }
   System.out.print(ans);
 }
}

Compiler output:
Main.java:15: error: cannot find symbol
   System.out.print(ans);
                    ^
  symbol:   variable ans
  location: class Main
1 error
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main() {
  int N,K;
  cin>>N>>K;
  if(N==1){
    cout<<1<<endl;
  }
  else{
    int i =1;
    while (N>=pow(K,i)) {
        i+=1;
      }
    }
    cout<<i<<endl;
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:15:11: error: 'i' was not declared in this scope
   15 |     cout<<i<<endl;
      |           ^
a.cc: At global scope:
a.cc:17:1: error: expected declaration before '}' token
   17 | }
      | ^
Language: C

include<stdio.h>
#include<math.h>
int main()
{
  int N,K;
  scanf("%d %d",&N,&K);
  float A=log10(N)/log10(K);
  int i;
  for(i=0;i<10000000;i++){
    if((i<A)&&(A<i+1)){
      break;
    }
  }
  printf("%d",i+1);
  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:6:3: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    6 |   scanf("%d %d",&N,&K);
      |   ^~~~~
main.c:3:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
    2 | #include<math.h>
  +++ |+#include <stdio.h>
    3 | int main()
main.c:6:3: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    6 |   scanf("%d %d",&N,&K);
      |   ^~~~~
main.c:6:3: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:14:3: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
   14 |   printf("%d",i+1);
      |   ^~~~~~
main.c:14:3: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:14:3: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:14:3: note: include '<stdio.h>' or provide a declaration of 'printf'
Language: C

include<stdio.h>
#include<math.h>
int main()
{
  int N,K;
  scanf("%d %d",&N,&K);
  float A=logK(N);
  int i;
  for(i=0;i<10000000;i++){
    if((i<A)&&(A<i+1)){
      break;
    }
  }
  printf("%d",i+1);
  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:6:3: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    6 |   scanf("%d %d",&N,&K);
      |   ^~~~~
main.c:3:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
    2 | #include<math.h>
  +++ |+#include <stdio.h>
    3 | int main()
main.c:6:3: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    6 |   scanf("%d %d",&N,&K);
      |   ^~~~~
main.c:6:3: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:7:11: error: implicit declaration of function 'logK'; did you mean 'logl'? [-Wimplicit-function-declaration]
    7 |   float A=logK(N);
      |           ^~~~
      |           logl
main.c:14:3: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
   14 |   printf("%d",i+1);
      |   ^~~~~~
main.c:14:3: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:14:3: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:14:3: note: include '<stdio.h>' or provide a declaration of 'printf'
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 K = sc.nextInt();
		
  final String hex = " fe ";
  final int dec = Integer.parseInt(hex, N);
  final int n = K;
  final String baseK = Integer.toString(dec);
  
  System.out.println(baseK.length);
  
	
	}
}

Compiler output:
Main.java:16: error: cannot find symbol
  System.out.println(baseK.length);
                          ^
  symbol:   variable length
  location: variable baseK of type String
1 error
Language: C

#include <stdio.h>
 
int main(void) {
  int n,R;
  int count=0;
  int temp=1;
  scanf("%d %d",&N,&K);
  while(temp<=N){
    temp*=K;
    count++;
  }
  printf("%d",count);
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:7:18: error: 'N' undeclared (first use in this function)
    7 |   scanf("%d %d",&N,&K);
      |                  ^
main.c:7:18: note: each undeclared identifier is reported only once for each function it appears in
main.c:7:21: error: 'K' undeclared (first use in this function)
    7 |   scanf("%d %d",&N,&K);
      |                     ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main() {
    ios::sync_with_stdio(false);cin.tie(0);cout.tie(0);cout.precision(30);
    int n;
    int k;
    int s=0;
    cin>>n>>k;
    while(n/k >0){
        s=s+1;
        n=n/k;
    }
    cout<<s;
    return 0;
}

Compiler output:
a.cc:2:1: error: extended character   is not valid in an identifier
    2 | using namespace std;
      | ^
a.cc:2:1: error: extended character   is not valid in an identifier
a.cc:3:1: error: extended character   is not valid in an identifier
    3 | int main() {
      | ^
a.cc:3:11: error: extended character   is not valid in an identifier
    3 | int main() {
      |           ^
a.cc:2:1: error: 'using\U000000a0namespace\U000000a0std' does not name a type
    2 | using namespace std;
      | ^~~~~~~~~~~~~~~~~~~
a.cc:3:11: error: expected constructor, destructor, or type conversion before '\U000000a0'
    3 | int main() {
      |           ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
 
  int N,K,M;
  
  cin>>N>>K;
  
  M=0;
  
  while(N>K^M){
    M=M+1
  }
  
  cout<<M<<endl;
 
}

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

#include <bits/stdc++.h>
using namespace std;
 
int main() {
 
  int N,K,M;
  
  Cin>N>>K;
  
  M=0
  
  while(N>K^M){
    M=M+1
  }
  
  Cout<<M<<endl;

}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:3: error: 'Cin' was not declared in this scope; did you mean 'sin'?
    8 |   Cin>N>>K;
      |   ^~~
      |   sin
a.cc:10:6: error: expected ';' before 'while'
   10 |   M=0
      |      ^
      |      ;
   11 | 
   12 |   while(N>K^M){
      |   ~~~~~
a.cc:16:3: error: 'Cout' was not declared in this scope
   16 |   Cout<<M<<endl;
      |   ^~~~
Language: C++

#include<iostream>
using namespace std;
#define ll long long int
int main()
{
	ll n,r;
  	cin>>n>>r;
  	ll count=0;
  	while(n!=0)
    {
      n=n/k;
      count++;
    }
      cout<<count;
  

}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:11: error: 'k' was not declared in this scope
   11 |       n=n/k;
      |           ^
Language: C++

#include <iostream>
using namespace std;

int compare(n,k,x){
  if(n<pow(k,x)){
    return x;
  }else{
    return compare(n,k,x+1);
  }
}

int main(){
  int n,k;
  cin >> n >> k;
  cout << compare(n,k,1) << endl;
  return 0;
}

Compiler output:
a.cc:4:13: error: 'n' was not declared in this scope
    4 | int compare(n,k,x){
      |             ^
a.cc:4:15: error: 'k' was not declared in this scope
    4 | int compare(n,k,x){
      |               ^
a.cc:4:17: error: 'x' was not declared in this scope
    4 | int compare(n,k,x){
      |                 ^
a.cc:4:18: error: expression list treated as compound expression in initializer [-fpermissive]
    4 | int compare(n,k,x){
      |                  ^
a.cc: In function 'int main()':
a.cc:15:18: error: 'compare' cannot be used as a function
   15 |   cout << compare(n,k,1) << endl;
      |           ~~~~~~~^~~~~~~
Language: C++

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

int main(){
int n,k,i=1;
cin >> n >> k;
  for(i=1;n=>pow(k,i);i++){
  }
  cout << i << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:13: error: expected primary-expression before '>' token
    7 |   for(i=1;n=>pow(k,i);i++){
      |             ^
Language: C++

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

int main(){
int n,k,i=1;
cin >> n >> k;
  for(i=1;n=>pow(k,i);i++){
  }
  cout << i << endl;
}

Compiler output:
a.cc:1:1: error: 'include' does not name a type
    1 | include<bits/stdc++.h>
      | ^~~~~~~
a.cc: In function 'int main()':
a.cc:6:1: error: 'cin' was not declared in this scope
    6 | cin >> n >> k;
      | ^~~
a.cc:7:13: error: expected primary-expression before '>' token
    7 |   for(i=1;n=>pow(k,i);i++){
      |             ^
a.cc:7:14: error: 'pow' was not declared in this scope
    7 |   for(i=1;n=>pow(k,i);i++){
      |              ^~~
a.cc:9:3: error: 'cout' was not declared in this scope
    9 |   cout << i << endl;
      |   ^~~~
a.cc:9:16: error: 'endl' was not declared in this scope
    9 |   cout << i << endl;
      |                ^~~~
Language: C++

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

int main(){
int n,k,i=1;
cin >> n >> k;
  for(i=1;n=>pow(k,i);i++){
  }
  cout << i << endl;


Compiler output:
a.cc: In function 'int main()':
a.cc:7:13: error: expected primary-expression before '>' token
    7 |   for(i=1;n=>pow(k,i);i++){
      |             ^
a.cc:9:21: error: expected '}' at end of input
    9 |   cout << i << endl;
      |                     ^
a.cc:4:11: note: to match this '{'
    4 | int main(){
      |           ^
Language: C++

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

int main(){
int n,a,i;
cin >> n >> k;
  for(i=1; n>pow(k,i);){
    i++;
  }
  cout << i << endl;

}


Compiler output:
a.cc: In function 'int main()':
a.cc:6:13: error: 'k' was not declared in this scope
    6 | cin >> n >> k;
      |             ^
Language: C++

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

int main(){
int n,a,i;
cin >> n >> k;
  for(i=1; n<pow(k,i);){
    i++;
  }
  cout << i << endl;

}


Compiler output:
a.cc: In function 'int main()':
a.cc:6:13: error: 'k' was not declared in this scope
    6 | cin >> n >> k;
      |             ^
Language: C++

#include<iostream>
int main(void){
  long n;
  int k;
  int counter=1;
  while(n>=k){
    counter+=1;
    n = (n-n%k)/k;
  }
  cout << counter;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   10 |   cout << counter;
      |   ^~~~
      |   std::cout
In file included from a.cc:1:
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
Language: C++

int main() {
	int n, k;
	std::cin >> n >> k;
	char c[];
	int i = 0;
	while (n > c)
	{
		c[i] = n % k;
		i++;
		n = n /2;
	}

	printf(c,$s);
}

Compiler output:
a.cc: In function 'int main()':
a.cc:3:14: error: 'cin' is not a member of 'std'
    3 |         std::cin >> n >> k;
      |              ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | int main() {
a.cc:4:14: error: storage size of 'c' isn't known
    4 |         char c[];
      |              ^
a.cc:13:18: error: '$s' was not declared in this scope
   13 |         printf(c,$s);
      |                  ^~
a.cc:13:9: error: 'printf' was not declared in this scope
   13 |         printf(c,$s);
      |         ^~~~~~
a.cc:1:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
  +++ |+#include <cstdio>
    1 | int main() {
Language: C++

int main() {
	int n, k;
	std::cin >> n >> k;
	char[] c;
	int i = 0;
	while (n > c)
	{
		c[i] = n % k;
		i++;
		n = n /2;
	}

	printf(c,$s);
}

Compiler output:
a.cc: In function 'int main()':
a.cc:3:14: error: 'cin' is not a member of 'std'
    3 |         std::cin >> n >> k;
      |              ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | int main() {
a.cc:4:13: error: structured binding declaration cannot have type 'char'
    4 |         char[] c;
      |             ^~
a.cc:4:13: note: type must be cv-qualified 'auto' or reference to cv-qualified 'auto'
a.cc:4:13: error: empty structured binding declaration
a.cc:4:16: error: expected initializer before 'c'
    4 |         char[] c;
      |                ^
a.cc:6:20: error: 'c' was not declared in this scope
    6 |         while (n > c)
      |                    ^
a.cc:13:16: error: 'c' was not declared in this scope
   13 |         printf(c,$s);
      |                ^
a.cc:13:18: error: '$s' was not declared in this scope
   13 |         printf(c,$s);
      |                  ^~
a.cc:13:9: error: 'printf' was not declared in this scope
   13 |         printf(c,$s);
      |         ^~~~~~
a.cc:1:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
  +++ |+#include <cstdio>
    1 | int main() {
Language: C++

int main() {
	int n, k;
	std::cin >> n >> k;
	char[] c;
	int i = 0;
	while (n > k)
	{
		c[i] = n % k;
		i++;
		n = n /k;
	}

	std::cout << c;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:3:14: error: 'cin' is not a member of 'std'
    3 |         std::cin >> n >> k;
      |              ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | int main() {
a.cc:4:13: error: structured binding declaration cannot have type 'char'
    4 |         char[] c;
      |             ^~
a.cc:4:13: note: type must be cv-qualified 'auto' or reference to cv-qualified 'auto'
a.cc:4:13: error: empty structured binding declaration
a.cc:4:16: error: expected initializer before 'c'
    4 |         char[] c;
      |                ^
a.cc:8:17: error: 'c' was not declared in this scope
    8 |                 c[i] = n % k;
      |                 ^
a.cc:13:14: error: 'cout' is not a member of 'std'
   13 |         std::cout << c;
      |              ^~~~
a.cc:13:14: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:13:22: error: 'c' was not declared in this scope
   13 |         std::cout << c;
      |                      ^
Language: C++

int main() {
	int n, k;
	std::cin >> n >> k;
	char[] c;
	int i = 0;
	while (n > c)
	{
		c[i] = n % k;
		i++;
		n = n /2;
	}

	std::cout << c;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:3:14: error: 'cin' is not a member of 'std'
    3 |         std::cin >> n >> k;
      |              ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | int main() {
a.cc:4:13: error: structured binding declaration cannot have type 'char'
    4 |         char[] c;
      |             ^~
a.cc:4:13: note: type must be cv-qualified 'auto' or reference to cv-qualified 'auto'
a.cc:4:13: error: empty structured binding declaration
a.cc:4:16: error: expected initializer before 'c'
    4 |         char[] c;
      |                ^
a.cc:6:20: error: 'c' was not declared in this scope
    6 |         while (n > c)
      |                    ^
a.cc:13:14: error: 'cout' is not a member of 'std'
   13 |         std::cout << c;
      |              ^~~~
a.cc:13:14: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:13:22: error: 'c' was not declared in this scope
   13 |         std::cout << c;
      |                      ^
Language: C++

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

int main(){
	ll n, k;cin>>n>>k;
	double ans = log2f(n);
	ans /= log2f(k);
	cout<<ceil(ans)<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:5:9: error: 'll' was not declared in this scope
    5 |         ll n, k;cin>>n>>k;
      |         ^~
a.cc:5:22: error: 'n' was not declared in this scope; did you mean 'yn'?
    5 |         ll n, k;cin>>n>>k;
      |                      ^
      |                      yn
a.cc:5:25: error: 'k' was not declared in this scope
    5 |         ll n, k;cin>>n>>k;
      |                         ^
Language: C++

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

using namesapce std;

int main(){
  int n,k;
  cin >> n >> k;
  int count= 0;
  while (n/k > 1){
    n = n/k;
    count++;
  }
  cout << ++count << endl;
  
}

Compiler output:
a.cc:4:7: error: expected nested-name-specifier before 'namesapce'
    4 | using namesapce std;
      |       ^~~~~~~~~
a.cc: In function 'int main()':
a.cc:8:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    8 |   cin >> n >> k;
      |   ^~~
      |   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:14:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   14 |   cout << ++count << 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:14:22: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   14 |   cout << ++count << 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>
using namespase std;
int main(){
  int n,k,cnt=0;
  cin>>n>>k;
  
  while(n <=k){
    ++cnt;
    n /= k;
    }
  
  cout<<cnt+1<<'\n';
}
 

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

#include<iostream>
using namespse std;
int main(){
  int n,k,cnt=0;
  cin>>n>>k;
  
  while(n <=k){
    ++cnt;
    n /= k;
    }
  
  cout<<cnt+1<<'\n';
}


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

#include<bits/stdc++>
using namespse std;
int main(){
  int n,k,cnt=0;
  cin>>n>>k;
  
  while(n <=k){
    ++cnt;
    n /= k;
    }
  
  cout<<cnt+1<<'\n';
}


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

#include<bits/stdc++>
using namespse std;
int main(){
  int n,k,cnt=0;
  cin>>n>>k;
  
  while(n <=k){
    ++cnt;
    n /= k;
    }
  
  cout<<cnt++<<'\n';
}

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

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


int main()
{
        int n,k;
        int a== 0;
        cin >> n>> k;
        while(n/5 ==0)
        {
                n/= 5;
                a++;
        }
        cout << a<< endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:14: error: expected initializer before '==' token
    8 |         int a== 0;
      |              ^~
a.cc:13:17: error: 'a' was not declared in this scope
   13 |                 a++;
      |                 ^
a.cc:15:17: error: 'a' was not declared in this scope
   15 |         cout << a<< endl;
      |                 ^
Language: Java

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.StringTokenizer;

public class atcoder_156 {
	static class FastReader{
		BufferedReader br;
		StringTokenizer st;
		public FastReader() {
			br = new BufferedReader(new InputStreamReader(System.in));
		}
		public String next() {
			while(st==null || !st.hasMoreElements()) {
				try {
					st = new StringTokenizer(br.readLine());
					
				}
				catch(IOException e) {
					e.printStackTrace();
				}
			}
			return st.nextToken();
		}
		int nextInt() {
			return Integer.parseInt(next());
		}
		long nextLong() {
			return Long.parseLong(next());
		}
		double nextDouble() {
			return Double.parseDouble(next());
		}
	}
	public static void main(String[] args) {
		FastReader ob = new FastReader();
		int n = ob.nextInt(),k=ob.nextInt();
		System.out.println((int)Math.floor(Math.log((double)n)/Math.log((double)k)) + 1);
				
	}

}


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

class Main{
  public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int R = sc.nextInt();
        int a = 1;
        int cnt = 0;
        while (true){
            a = a * R;
            if(a >= N){
                break;
            }
            cnt++;
        }

        System.out.println(cnt);
    }
}

Compiler output:
Main.java:3: error: cannot find symbol
        Scanner sc = new Scanner(System.in);
        ^
  symbol:   class Scanner
  location: class Main
Main.java:3: error: cannot find symbol
        Scanner sc = new Scanner(System.in);
                         ^
  symbol:   class Scanner
  location: class Main
2 errors
Language: C++

#include <vector>
#include <bits/stdc++.h>
#include <iomanip>
#include <pow>

using namespace std;
int main(){
    int n , k;　
  	int ans = 0;
    cin >> n >> k;
    for(int i = 0; 1 ; i++){
        if(n - pow(k , i) <= 0){
            ans = i;
            break;
        }
    }
    cout << ans << endl;
}

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

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

int main(){
    int n , k,ans = 0;
    cin >> n >> k;
    for(int i = 0; 1 ; i++){
        if(n - pow(k , i) <= 0){
            ans = i;
            break;
        }
    }
    cout << ans << endl;
}

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

/* In the name of Allah */
#include<bits/stdc++.h>
#include<math.h>
using namespace std;
int main(){
	long long n,r,ans=0,m=1;
	cin>>n>>r;
	if(r==1){
		cout<<long long(log10(n)+1);
		return 0;
	}
	while(n>0){
		ans+=m*(n%r);
		m*=10;
		n/=r;	
	}
	int anss=log10(ans)+1;
	cout<<anss;	
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:23: error: expected primary-expression before 'long'
    9 |                 cout<<long long(log10(n)+1);
      |                       ^~~~
Language: C++

#include <bits/stdc++.h>
using namespace std; inline void fileio(const char* in, const char* out) { freopen(in, "r", stdin); freopen(out, "w", stdout); } 
#define TD typedef
#define forx(i,n) for(int i = 0; i < (n); ++i)
#define forxr(i,n) for(int i = (n)-1; i >= 0; --i)
TD long long ll; TD long double ld; TD pair<int,int> pii; TD pair<ll,ll> pll; TD vector<int> VI; TD vector<bool> VB; TD vector<ll> VL;
const char nl = '\n'; const int INF = 0x3f3f3f3f; const ll LINF = 0x3f3f3f3f3f3f3f3fll; const ld EPS = 1e-9, PI = acos(-1);
#define ff first
#define ss second
#define all(c) c.begin(),c.end()

const int N = 2e9;
char out[N];

int main() {
  atexit([](){ cerr << "Time: " << (ld)clock() / CLOCKS_PER_SEC << nl; });
  ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
  cout << fixed << setprecision(12);
  // Emily <3
  int n, b;
  cin >> n >> b;
  itoa(n, out, b);
  cout << strlen(out) << nl;

  return 0;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:22:3: error: 'itoa' was not declared in this scope
   22 |   itoa(n, out, b);
      |   ^~~~
Language: Java

import java.util.Scanner;
class Main
{
	public static void main(String args[])
	{
		Scanner sc=new Scanner(System.in);
        int n=sc.nextInt();
        int k=sc.nextInt();
        int sum=n;
        int ans=0;


        for(int i=0; i<n; i++){
            sum=sum/k;
            ans++;
            if(sum<k){
                ans++;
                break;
            }
        }
      　if(sum!=0){
         ans++;
        }
        sc.close();
        System.out.println(ans);
    }
}


Compiler output:
Main.java:21: error: illegal character: '\u3000'
      ?if(sum!=0){
      ^
1 error
Language: C++

#include<iostream>
using namespace std;
int main() {
  ll N;
  int K;
  cin >> N >> K;
  int cnt = 0;
  while(N > 0) {
    cnt++;
    N /= K;
  }
  cout << cnt << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:3: error: 'll' was not declared in this scope
    4 |   ll N;
      |   ^~
a.cc:6:10: error: 'N' was not declared in this scope
    6 |   cin >> N >> K;
      |          ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){int n,k;int res=0;cin>>n>>k;
  while(n>0){n/=k;ans++;
  }
  cout<<ans<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:19: error: 'ans' was not declared in this scope; did you mean 'abs'?
    4 |   while(n>0){n/=k;ans++;
      |                   ^~~
      |                   abs
a.cc:6:9: error: 'ans' was not declared in this scope; did you mean 'abs'?
    6 |   cout<<ans<<endl;
      |         ^~~
      |         abs
Language: C++

#include<iostream>
using namespace std;

int main()
{
  int n,k;
  cin>>n>>k;
  int l=int(floor(log(n)/log(k))+1);
  cout<<l;
  
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:19: error: 'log' was not declared in this scope; did you mean 'long'?
    8 |   int l=int(floor(log(n)/log(k))+1);
      |                   ^~~
      |                   long
a.cc:8:13: error: 'floor' was not declared in this scope
    8 |   int l=int(floor(log(n)/log(k))+1);
      |             ^~~~~
Language: C++

#include<iostream>
ushung namespace std;

int main()
{
  int n,k;
  cin>>n>>k;
  int l=int(floor(log(n)/log(k))+1);
  cout<<l;
  
  return 0;
}

Compiler output:
a.cc:2:1: error: 'ushung' does not name a type
    2 | ushung namespace std;
      | ^~~~~~
a.cc: In function 'int main()':
a.cc:7:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    7 |   cin>>n>>k;
      |   ^~~
      |   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:8:19: error: 'log' was not declared in this scope; did you mean 'long'?
    8 |   int l=int(floor(log(n)/log(k))+1);
      |                   ^~~
      |                   long
a.cc:8:13: error: 'floor' was not declared in this scope
    8 |   int l=int(floor(log(n)/log(k))+1);
      |             ^~~~~
a.cc:9:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    9 |   cout<<l;
      |   ^~~~
      |   std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
Language: C++

#include<iostream.h>
ushung namespace std;

int main()
{
  int n,k;
  cin>>n>>k;
  int l=int(floor(log(n)/log(k))+1);
  cout<<l;
  
  return 0;
}

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

#include<bits/stdc++.h>
using namespace std;
void solve1(){
 int n,k;
    cin>>n>>k;
    int cnt=0;
    while(n>0){
        n=n/k;
        cnt++;
    }
   cout<<cnt<<endl;
}
/*
void solve2(){
 int x,y;
 cin>>x>>y;
 int temp=1,ans=0;
 while(temp<=x){
    temp=temp*y;
    ++ans;
 }
 cout<<ans<<endl;
}
*/
int main()
{
    cin.tie(0);
    ios::sync_with_stdio(false);
    solve1();
    solve2();
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:30:5: error: 'solve2' was not declared in this scope; did you mean 'solve1'?
   30 |     solve2();
      |     ^~~~~~
      |     solve1
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  long long int n;
  int k,res;
  cin>>n>>k;
  while(n>0){
    n/=k;
    ans++;
  }
  cout<<ans<<endl;
  return 0;
}
  

Compiler output:
a.cc: In function 'int main()':
a.cc:9:5: error: 'ans' was not declared in this scope; did you mean 'abs'?
    9 |     ans++;
      |     ^~~
      |     abs
a.cc:11:9: error: 'ans' was not declared in this scope; did you mean 'abs'?
   11 |   cout<<ans<<endl;
      |         ^~~
      |         abs
Language: C++

#include <bits/stdc++.h>

using namespace std;


int main() {

ll n,k;
cin >> n >> k;
int ans = 0;
while(n)
{
    ++ans;
    n/=k;
}
cout << ans ;

    
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:1: error: 'll' was not declared in this scope
    8 | ll n,k;
      | ^~
a.cc:9:8: error: 'n' was not declared in this scope; did you mean 'yn'?
    9 | cin >> n >> k;
      |        ^
      |        yn
a.cc:9:13: error: 'k' was not declared in this scope
    9 | cin >> n >> k;
      |             ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main(){
    int n,k;
    cin>>n>>k;
  	if(n%k==0){
      cout<<ceil(log(n)/log(k))+1;
    else{
    	cout<<ceil(log(n)/log(k));
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:5: error: expected '}' before 'else'
    9 |     else{
      |     ^~~~
a.cc:7:19: note: to match this '{'
    7 |         if(n%k==0){
      |                   ^