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

#include <iostream>
 #include <bits/stdc++.h>

using namespace std;
int main()
{
    int n=100;
    vector<int> v(n,100);
    for(int i=0;i<100;i++)
    {
        v[i]=i;
    
    }
    v.push_back(10);
    cout << v.size << endl;
    reverse(v.begin(),v.end());
    sort(v.begin(),v.end(),greater<int>());
    sort(v.begin(),v.end());
    auto low=lower_bound(v.begin(),v.end(),20);
    cout << *low << endl;
    auto up =upper_bound(v.begin(),v.end(),20);
    cout << *up <<endl;

}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:10: error: invalid use of non-static member function 'std::vector<_Tp, _Alloc>::size_type std::vector<_Tp, _Alloc>::size() const [with _Tp = int; _Alloc = std::allocator<int>; size_type = long unsigned int]'
   15 |     cout << v.size << endl;
      |     ~~~~~^~~~~~~~~
In file included from /usr/include/c++/14/vector:66,
                 from /usr/include/c++/14/functional:64,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:53,
                 from a.cc:2:
/usr/include/c++/14/bits/stl_vector.h:992:7: note: declared here
  992 |       size() const _GLIBCXX_NOEXCEPT
      |       ^~~~
Language: C++

#include<stdio.h>
int main()
{
int a;
  scanf("%d",&a);
if(a<10) printf("%d",a);
else if(a<100) printf("10");
else if(a<1000) printf("%d",a-90);
else if(a<10000) printf("910");
else if(a<100000) printf("%d",a-9090);
else printf("90909")
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:21: error: expected ';' before 'return'
   11 | else printf("90909")
      |                     ^
      |                     ;
   12 | return 0;
      | ~~~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
using vi = vector<int>;
using vii = vector<vi>;
using vs = vector<string>;
using in6 = int64_t;
using ind = double;
using pii = pair<int,int>;
using psi = pair<string,int>;
using vpi = vector<pii>;
using vps = vector<psi>;
#define rep(i, n) for (in6 i = 0; i < (in6)(n); i++)
#define repa(i,a,n) for(in6 i = a; i < (in6)(n); i++)
#define repdown(i,n) for(in6 i = n; i > 0; i--)
#define kyun ios::sync_with_stdio(false)
#define hinata cout << "\n"
#define all(c) (c).begin(), (c).end()
#define pb push_back
#define inf 2147483647
#define dset(n) cout << fixed << setprecision(n)

int count(int x) {
  int ret = 0;
  while(x) {
    ret++;
    x /= 10;
  }
  return ret;
}

int main() {
  kyun;
  int n;
  cin >> n;
  if(count(n) == 1) cout << n;
  else if(count(n) == 2) cout << 9;
  else if(coutn(n) == 3) cout << n - 99 + 9;
  else if(count(n) == 4) cout << 909;
  else if(count(n) == 5) cout << n - 9999 + 909;
  else cout << 90909;
  hinata;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:37:11: error: 'coutn' was not declared in this scope; did you mean 'count'?
   37 |   else if(coutn(n) == 3) cout << n - 99 + 9;
      |           ^~~~~
      |           count
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main()
{
	int t,n,ba=0;
	char s[6];
	cin>>n;
	for(t=1;t<=n;t++)
	{
		itoa(t,s,10);
		if(strlen(s)%2==1)
		{
			ba++;
		}
		//cout<<ba<<" ";
	}
	//string类型转化;
	cout<<ba;
	return 0;
} 

Compiler output:
a.cc: In function 'int main()':
a.cc:10:17: error: 'itoa' was not declared in this scope
   10 |                 itoa(t,s,10);
      |                 ^~~~
Language: C++

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

int main(){
    int A;cin >> A;
    int ans=0;
    for(int i=1;i<=A;i++){
        int digit = (cons)i.size();
        if(digit%2!=0){
            ans++;
        }
    }
    cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:22: error: 'cons' was not declared in this scope; did you mean 'cos'?
    8 |         int digit = (cons)i.size();
      |                      ^~~~
      |                      cos
Language: C++

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

int main(){
    int A;cin >> A;
    int ans=0;
    for(int i=1;i<=A;i++){
        int digit = i.size();
        if(digit%2!=0){
            ans++;
        }
    }
    cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:23: error: request for member 'size' in 'i', which is of non-class type 'int'
    8 |         int digit = i.size();
      |                       ^~~~
Language: C++

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

int main(){
    int A;cin >> A;
    int ans=0;
    for(int i=1;i<=A;i++){
        if(i.size%2!=0){
            ans++;
        }
    }
    cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:14: error: request for member 'size' in 'i', which is of non-class type 'int'
    8 |         if(i.size%2!=0){
      |              ^~~~
Language: C++

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

int main(){
    int A;cin >> A;
    int ans=0;
    for(int i=1;i<=A;i++){
        if(i.size()%2!=0){
            ans++;
        }
    }
    cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:14: error: request for member 'size' in 'i', which is of non-class type 'int'
    8 |         if(i.size()%2!=0){
      |              ^~~~
Language: C++

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

int main(){
    int A;cin >> A;
    int ans=0;
    for(int i=1;i<=N;i++){
        if(i.size()%2!=0){
            ans++;
        }
    }
    cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:20: error: 'N' was not declared in this scope
    7 |     for(int i=1;i<=N;i++){
      |                    ^
a.cc:8:14: error: request for member 'size' in 'i', which is of non-class type 'int'
    8 |         if(i.size()%2!=0){
      |              ^~~~
Language: Java

import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		Integer cnt = 0;
      	for(int i = 0; i < N; i++){
        	if(i.toString().length()%2==1){
            	cnt++;
            }
        }
		System.out.println(cnt);
	}
}

Compiler output:
Main.java:8: error: int cannot be dereferenced
        	if(i.toString().length()%2==1){
        	    ^
1 error
Language: C++

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

int main() {
  int N;
  cin >> N;
  int cnt = 0;
  for(int i=1;i<=N;i++){
    if(log10(i) % 2 == 1){
      cnt++;
    }
  }
  
  cout << cnt << endl;
  return(0);
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:17: error: invalid operands of types '__gnu_cxx::__enable_if<true, double>::__type' {aka 'double'} and 'int' to binary 'operator%'
    9 |     if(log10(i) % 2 == 1){
      |        ~~~~~~~~ ^ ~
      |             |     |
      |             |     int
      |             __gnu_cxx::__enable_if<true, double>::__type {aka double}
Language: C++

#include <iostream>
#include <string>
#include <vector>
#include <list>
#include <map>
#include <queue>
#include <stack>
#include <algorithm>
#include <fstream>
#include <sstream>
#include <iomanip>
#define ll long long

using namespace std;

long long MOD = 1000000007;

int main(){
    int N;
    cin >> N;
    for(int i=1; i<=N; i++){
        if(i<10 || (100<=i&&i<1000) || (10000<=i&&i<100000)){
            cnt++;
        }
    }
    cout << cnt << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:23:13: error: 'cnt' was not declared in this scope; did you mean 'int'?
   23 |             cnt++;
      |             ^~~
      |             int
a.cc:26:13: error: 'cnt' was not declared in this scope; did you mean 'int'?
   26 |     cout << cnt << endl;
      |             ^~~
      |             int
Language: C++

#include<iostream>
using namespace std;

int main(){
  int n;
  cin >> n;
  int cnt++;
  for(int i=n;i>0;i--){
    if(i>0 && i<10){
      cnt++;
    }else if(i>=100 && i<1000){
      cnt++;
    }else if(i>=10000 && i<100000){
      cnt++;
    }
  }
  cout << cnt << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:10: error: expected initializer before '++' token
    7 |   int cnt++;
      |          ^~
a.cc:10:7: error: 'cnt' was not declared in this scope; did you mean 'int'?
   10 |       cnt++;
      |       ^~~
      |       int
a.cc:12:7: error: 'cnt' was not declared in this scope; did you mean 'int'?
   12 |       cnt++;
      |       ^~~
      |       int
a.cc:14:7: error: 'cnt' was not declared in this scope; did you mean 'int'?
   14 |       cnt++;
      |       ^~~
      |       int
a.cc:17:11: error: 'cnt' was not declared in this scope; did you mean 'int'?
   17 |   cout << cnt << endl;
      |           ^~~
      |           int
Language: C++

#include <algorithm>
#include <cmath>
#include <iostream>
#include <string>
#include <vector>
typedef long long ll;
#define all(x) (x).begin(), (x).end()  // sortなどの引数を省略
#define rep(i, n) for (ll i = 0; i < (ll)(n); i++)
#define max3(x, y, z) max(x, max(y, z))

#ifdef _MSC_FULL_VER  //デバッグ出力
#define dout cout
#define debug() if (true)
#define check(x) std::cout << "★" << #x << "の値:" << (x) << endl
#define pass(x) std::cout << "☆" << x << endl
#else
#define dout \
  if (false) cout
#define debug() if (false)
#define check(x) \
  if (false) cout << "★" << #x << "の値:" << (x) << endl
#define pass(x) \
  if (false) cout << "☆" << x << endl
#endif
using namespace std;
int main() {
  int a;
  if (a < 10) {
    cout << a;
  } else if (a < 100) {
    cout << 9;
  } else if (a < 1000) {
    cout << a-90;
  } else if (a < 10000) {
    cout << 909;
  } else {
    cout << a-9999+909l
  }
}
  /*
//よく使うやつ
int N;
cin >> N;
vector<int> list(N);
for (int i = 0; i < N; i++) {
cin >> list[i];
}
// for文
for (int i = 0; i < N; i++) {
}
//配列
vector<int> list;
list.at(i)
vector<vector<int>> list(10, vector<int>(10));
sort(all(list));
sort(all(list), greater<int>());
  //配列の内容表示
dout << "====listの内容====\n";
for (int i = 0; i < N; i++) dout << list[i] << endl;
dout << "====ここまで====\n";
*/


Compiler output:
a.cc: In function 'int main()':
a.cc:37:24: error: expected ';' before '}' token
   37 |     cout << a-9999+909l
      |                        ^
      |                        ;
   38 |   }
      |   ~
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main()
{
   int n;
   cin >> n;
   int num;
      if(n>=100000){
        num= 90909;
        cout << num << endl;}
      else if (n>=10000 && m<=99999)
      { num = n -9090;
      cout << num << endl; }
      else if (n>=1000 && n<=9999)
      {num =909;
       cout << num << endl;}
      else if (n>=100 && n<=999){
      num = n-90;
      cout << num << endl;}
      else if (n>=10 && n<=99)
      {num = 9;
       cout << num << endl;}
      else if (n<=9){
         num = n;
      cout <<num << endl;}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:28: error: 'm' was not declared in this scope
   12 |       else if (n>=10000 && m<=99999)
      |                            ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main()
{
   int n;
   cin >> n;
   int num;
      if(n=100000){
        num= n-90909;
        cout << num << endl;}
      else if (n>=10000 && m<=99999)
      { num = n -9090;
      cout << num << endl; }
      else if (n>=1000 && n<=9999)
      {num =909;
       cout << num << endl;}
      else if (n>=100 && n<=999){
      num = n-90;
      cout << num << endl;}
      else if (n>=10 && n<=99)
      {num = 9;
       cout << num << endl;}
      else if (n<=9){
         num = n;
      cout <<num << endl;}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:28: error: 'm' was not declared in this scope
   12 |       else if (n>=10000 && m<=99999)
      |                            ^
Language: C++

#include<iostream>
using namespace std;
int main(){
  int N;
  cin>>N;
  int counter=0;
  for (int i=1; i<N+1; i++){
    int clun=0;
    while(i>0){
      i/=10;
      clun++}
    if (clun%2!=0) counter++;}
  cout<<counter<<endl;}

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

#include<bits/stdc++.h>
using namespace std;
 
int main(){
int n,c=0;
  cin >> n;
  for(i=1;i<=n;i++){
  	if(i<10)
      c++;
    if(i > 99 && i<1000)
      c++;
    if(i > 9999 && i<100000)
      c++;
  }
  cout << c;
  
 
}

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

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

int main(){
int n,c=0;
  cin >> n;
  for(i=1;i<=n;i++){
  	if(i<10)
      c++;
    if(i > 99 && i<1000)
      c++;
    if(i > 9999 && i<100000)
      c++
  }
  cout << c;
  

}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:7: error: 'i' was not declared in this scope
    7 |   for(i=1;i<=n;i++){
      |       ^
a.cc:13:10: error: expected ';' before '}' token
   13 |       c++
      |          ^
      |          ;
   14 |   }
      |   ~
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
int N;
  cin >>N;
    int ans = 0;
    rep(i, 1, N + 1) {
        if (1 <= i and i <= 9) ans++;
        else if (100 <= i and i <= 999) ans++;
        else if (10000 <= i and i <= 99999) ans++;
    }
  cout << ans <<endl;

}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:9: error: 'i' was not declared in this scope
    8 |     rep(i, 1, N + 1) {
      |         ^
a.cc:8:5: error: 'rep' was not declared in this scope
    8 |     rep(i, 1, N + 1) {
      |     ^~~
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 ans = 0;
		for(int i = i;i < N+1;i++){
			if(i < 10){
				ans++;
			}else if(i > 99 && i < 1000){
				ans++;
			}else if(i > 9999 && i < 100000){
				ans++;
			}
		}
		System.out.println(ans);
	}
}

Compiler output:
Main.java:7: error: variable i might not have been initialized
		for(int i = i;i < N+1;i++){
		            ^
1 error
Language: C

#include<stdio.h>
int main(void){
  int n,count=0,s,i;
  scanf("%d",&n);
  for(i=1;i<=n;i++){
    char a[n][100001];
    a=(char)i;
    s=strlen(a[i]);
    if(s%2==1) count++;
  }
  printf("%d",count);
  return 0;
}
    

Compiler output:
main.c: In function 'main':
main.c:7:6: error: assignment to expression with array type
    7 |     a=(char)i;
      |      ^
main.c:8:7: error: implicit declaration of function 'strlen' [-Wimplicit-function-declaration]
    8 |     s=strlen(a[i]);
      |       ^~~~~~
main.c:2:1: note: include '<string.h>' or provide a declaration of 'strlen'
    1 | #include<stdio.h>
  +++ |+#include <string.h>
    2 | int main(void){
main.c:8:7: warning: incompatible implicit declaration of built-in function 'strlen' [-Wbuiltin-declaration-mismatch]
    8 |     s=strlen(a[i]);
      |       ^~~~~~
main.c:8:7: note: include '<string.h>' or provide a declaration of 'strlen'
Language: C

#include<stdio.h>
int main(void){
  int n,count=0,s;
  scanf("%d",&n);
  for(i=1;i<=n;i++){
    char a[n][100001];
    a=(char)i;
    s=strlen(a[i]);
    if(s%2==1) count++;
  }
  printf("%d",count);
  return 0;
}
    

Compiler output:
main.c: In function 'main':
main.c:5:7: error: 'i' undeclared (first use in this function)
    5 |   for(i=1;i<=n;i++){
      |       ^
main.c:5:7: note: each undeclared identifier is reported only once for each function it appears in
main.c:8:7: error: implicit declaration of function 'strlen' [-Wimplicit-function-declaration]
    8 |     s=strlen(a[i]);
      |       ^~~~~~
main.c:2:1: note: include '<string.h>' or provide a declaration of 'strlen'
    1 | #include<stdio.h>
  +++ |+#include <string.h>
    2 | int main(void){
main.c:8:7: warning: incompatible implicit declaration of built-in function 'strlen' [-Wbuiltin-declaration-mismatch]
    8 |     s=strlen(a[i]);
      |       ^~~~~~
main.c:8:7: note: include '<string.h>' or provide a declaration of 'strlen'
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  char a[10];
  int l=0;
  cin >> a;
  for(long long i=1;i<=a;i++){
    if(strlen(a)%2==1)l++;
  }
  cout << l;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:22: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    7 |   for(long long i=1;i<=a;i++){
      |                     ~^~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  char a[10];
  int l=0;
  cin >> a;
  for(long long i=1;i<a;i++){
    if(strlen(a)%2==1)l++;
  }
  cout << l;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:22: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    7 |   for(long long i=1;i<a;i++){
      |                     ~^~
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define rep2(s,i, n) for (int i = (int)s; i < (int)(n); i++)
#define pb push_back
typedef long long ll;
  
int main(){
    int n;
    cin>>n;
    int ans=0;
    rep2(1,i,n+1){
        string s =to_string(i);
        if(s.length()%2==1){
            ans++;
        }
    }
    cou<<ans<<endl;
    return 0;
}

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

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

int main() {
   int n;
  cin >> n;
  int i=1 ;
  int ans=0 ;
  while ( n >=i ){
    ans = ans+9*i
    i= i*100;
  }  
  cout << ans  << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:18: error: expected ';' before 'i'
   10 |     ans = ans+9*i
      |                  ^
      |                  ;
   11 |     i= i*100;
      |     ~
Language: C++

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

int main() {
   int n;
  cin >> n;
  int i=1 ;
  aint ans=0 ;
  while ( n >=i ){
    ans = ans+9*i
    i= i*100;
  }  
  cout << ans  << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:3: error: 'aint' was not declared in this scope; did you mean 'uint'?
    8 |   aint ans=0 ;
      |   ^~~~
      |   uint
a.cc:10:5: error: 'ans' was not declared in this scope; did you mean 'abs'?
   10 |     ans = ans+9*i
      |     ^~~
      |     abs
a.cc:13:11: error: 'ans' was not declared in this scope; did you mean 'abs'?
   13 |   cout << ans  << endl;
      |           ^~~
      |           abs
Language: C++

#include <bits/stdc++.h>
#include <math.h>
#define REP(i, n) for(int i = 0; i < (n); i++)
#define ALL(v) (v).begin(), (v).end()
using namespace std;
typedef long long ll;
typedef pair<int, int> P;
const int INF = 1001001001;
const int mINF = -1001001001;


int main() {
int n;
int ans=0;
cin >> n;
REP(i,n) {
  if(tostring(i).length()%2==1) ans++;
}
cout << ans << endl;
return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:17:6: error: 'tostring' was not declared in this scope
   17 |   if(tostring(i).length()%2==1) ans++;
      |      ^~~~~~~~
Language: C++

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

int main()
{
int N;
int ans=0;
cin >> N;
1 100 10000
if(N<=9)ans=N;
else if(N<=99)ans=9;
else if(N<=999)ans=N-90;
else if(N<=9999)ans=909;
else if(N<=99999)ans=N-9090;
else if(N<=100000)ans=90909;
cout << ans;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:2: error: expected ';' before numeric constant
   15 | 1 100 10000
      |  ^~~~
      |  ;
a.cc:17:1: error: 'else' without a previous 'if'
   17 | else if(N<=99)ans=9;
      | ^~~~
Language: Java

import java.util.Scanner;
class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int input = sc.nextInt();
    int output;
    if(input < 10){
      output = input
    }else if(input < 100){
      output = 9;
    }else if(input < 1000){
      output = 9 + input - 99;
    }else if(input < 10000){
      output = 9 + 900;
    }else{
      output = 9 + 900 + input - 9999;
    }
    System.out.println(output);
  }
}

Compiler output:
Main.java:8: error: ';' expected
      output = input
                    ^
1 error
Language: C

#include <stdio.h>
#include <math.h>
int main() {
　int n,a=0;
　scanf("%d",&n);
　for(int i=1;i<=n;i++)if((int)log10(i)%2==0)a++;
　printf("%d\n",a);
　return 0;
}


Compiler output:
main.c: In function 'main':
main.c:4:1: error: stray '\343' in program
    4 | <U+3000>int n,a=0;
      | ^~~~~~~~
main.c:5:1: error: stray '\343' in program
    5 | <U+3000>scanf("%d",&n);
      | ^~~~~~~~
main.c:6:1: error: stray '\343' in program
    6 | <U+3000>for(int i=1;i<=n;i++)if((int)log10(i)%2==0)a++;
      | ^~~~~~~~
main.c:7:1: error: stray '\343' in program
    7 | <U+3000>printf("%d\n",a);
      | ^~~~~~~~
main.c:8:1: error: stray '\343' in program
    8 | <U+3000>return 0;
      | ^~~~~~~~
Language: C

#include <stdio.h>
#include <math.h>
int main(void) {
　int n,a=0;
　scanf("%d",&n);
　for(int i=1;i<=n;i++)if((int)log10(i)%2==0)a++;
　printf("%d\n",a);
　return 0;
}


Compiler output:
main.c: In function 'main':
main.c:4:1: error: stray '\343' in program
    4 | <U+3000>int n,a=0;
      | ^~~~~~~~
main.c:5:1: error: stray '\343' in program
    5 | <U+3000>scanf("%d",&n);
      | ^~~~~~~~
main.c:6:1: error: stray '\343' in program
    6 | <U+3000>for(int i=1;i<=n;i++)if((int)log10(i)%2==0)a++;
      | ^~~~~~~~
main.c:7:1: error: stray '\343' in program
    7 | <U+3000>printf("%d\n",a);
      | ^~~~~~~~
main.c:8:1: error: stray '\343' in program
    8 | <U+3000>return 0;
      | ^~~~~~~~
Language: C++

#include<bits/stdc++.h>
#define rep(i,n) for (int i = 0; i < n; ++i)
#define rep2(i,s,n) for (int i = s; i < n; ++i)
#define all(a) a.begin(),a.end()
#define tmax(a,b,c) max(a,max(b,c))
#define tmin(a,b,c) min(a,min(b,c))
#define pb push_back
#define fi first
#define se second
using namespace std;
using ll = long long;
using P = pair<int,int>;
template<class T> inline bool chmin(T& a,T b) {if(a > b){a = b; return true;} return false;}
template<class T> inline bool chmax(T& a,T b) {if(a < b){a = b; return true;} return false;}
const int inf = 1001001001;

int main() {
    int n;
    cin >> n;
    int ans = 0;
    auto cnt = [](int n) {
        int ret = 0;
        while(n > 0) {
            ret++;
            n /= 10;
        }
        return ret;
    };
    rep2(i,1,n) {
        if(cnt(i)%2 == 1) ans+;;
    }
    cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:30:31: error: expected primary-expression before ';' token
   30 |         if(cnt(i)%2 == 1) ans+;;
      |                               ^
Language: C++

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

int main() {
  int N;
  cin >> N;
  int T = N
  int count = 0;
  while (N > 0){
    N = N / 10;
    count++;
  }
  if(count == 1){
    cout << T << endl;
  }
  if(count == 2){
    cout << 9 << endl;
  }
  if(count == 3){
    cout << 9 + T - 99 << endl;
  }
  if(count == 4){
    cout << 9 + 900 << endl;
  }
  if(count == 5){
    cout << 9 + 900 + T - 9999 << endl;
  }
  if(count == 6){
    cout << 9 + 900 + 90000 << endl;
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:3: error: expected ',' or ';' before 'int'
    8 |   int count = 0;
      |   ^~~
a.cc:11:10: error: no post-increment operator for type
   11 |     count++;
      |          ^~
a.cc:13:12: error: invalid operands of types '<unresolved overloaded function type>' and 'int' to binary 'operator=='
   13 |   if(count == 1){
      |      ~~~~~~^~~~
a.cc:16:12: error: invalid operands of types '<unresolved overloaded function type>' and 'int' to binary 'operator=='
   16 |   if(count == 2){
      |      ~~~~~~^~~~
a.cc:19:12: error: invalid operands of types '<unresolved overloaded function type>' and 'int' to binary 'operator=='
   19 |   if(count == 3){
      |      ~~~~~~^~~~
a.cc:22:12: error: invalid operands of types '<unresolved overloaded function type>' and 'int' to binary 'operator=='
   22 |   if(count == 4){
      |      ~~~~~~^~~~
a.cc:25:12: error: invalid operands of types '<unresolved overloaded function type>' and 'int' to binary 'operator=='
   25 |   if(count == 5){
      |      ~~~~~~^~~~
a.cc:28:12: error: invalid operands of types '<unresolved overloaded function type>' and 'int' to binary 'operator=='
   28 |   if(count == 6){
      |      ~~~~~~^~~~
Language: C++

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

bool judge(int n){
  bool ans = false;
  int count = 0;
  do{
    count++;
    n/=10;
  }while(n/10>0)
    
  if(count%2==1)ans = true;
  return ans;
}

int main(){
    int n;
    cin >> n;
    int count = 0;
    for(int i=1;i<=n;++i){
      bool tmp = judge(i);
      if(tmp)count++;
    }
   cout << count << endl;

    return 0;
}


Compiler output:
a.cc: In function 'bool judge(int)':
a.cc:11:17: error: expected ';' before 'if'
   11 |   }while(n/10>0)
      |                 ^
      |                 ;
   12 | 
   13 |   if(count%2==1)ans = true;
      |   ~~
Language: C++

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

int main() {
    string N; cin >> N;
    int n = stoi(N);
    int cnt = 0;
    for (int i = 1; i <= n; i++) {
        string s = to_string(i);
        if ((int)s.size % 2 == 1) {
            cnt++;
        }
    }
    cout << cnt << endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:20: error: invalid use of member function 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]' (did you forget the '()' ?)
   10 |         if ((int)s.size % 2 == 1) {
      |                  ~~^~~~
      |                        ()
Language: C

#include <stdio.h>

int main(void){
    /*配列に正の整数を格納*/
    int i = 0,n;
    scanf("%d",&n);
    int array[n];
    while(i < n){
        array[i] = i + 1;
        i++;
    }

    /*一つずつカウント*/
    int count = 0;
    i = 0;
    while(i < n){
        if(9999 < array[i] <100000 || 99 < array[i] < 1000 || arrya[i] < 10){
            count++;
        }
    }
    printf("%d\n",count);

    return 0;

}

Compiler output:
main.c: In function 'main':
main.c:17:63: error: 'arrya' undeclared (first use in this function); did you mean 'array'?
   17 |         if(9999 < array[i] <100000 || 99 < array[i] < 1000 || arrya[i] < 10){
      |                                                               ^~~~~
      |                                                               array
main.c:17:63: note: each undeclared identifier is reported only once for each function it appears in
Language: C++

#include<bits/stdc++.h>
using namespace std;
int cdig(int k)
{
  int c=0;
  while(k!=0)
  {
    int r=n%10;
    c++;
    k/=10;
  }
}
int main()
{
int n;
  cin>>n;
  int i,c=0;
  for(i=0;i<=n;i++)
  {
    if(cdig(i)%2!=0)
      c++;
  }
  cout<<c;
}

Compiler output:
a.cc: In function 'int cdig(int)':
a.cc:8:11: error: 'n' was not declared in this scope
    8 |     int r=n%10;
      |           ^
a.cc:12:1: warning: no return statement in function returning non-void [-Wreturn-type]
   12 | }
      | ^
Language: C++

   int res=0;
int i=1;
int n;
cin>>n;
int digits=0;
bool reham=true;
while(n>0){

   if(n>=(pow(10,i)-1)) {
if(i>1)digits--;
       // n=n-((pow(10,i)-1)-res);
        digits+=(pow(10,i)-1)-res;

   }
   i+=2;

   res=(pow(10,i-1)-1);

 if(n<(pow(10,i)-1)) {break;}

}
//cout<<digits<<endl;

if(n<pow(10,i)-1 && n>pow(10,i-1)-1 &&i%2!=0){digits+=(n-(pow(10,i-1)-1)); }
cout<<digits;







}


Compiler output:
a.cc:4:1: error: 'cin' does not name a type
    4 | cin>>n;
      | ^~~
a.cc:7:1: error: expected unqualified-id before 'while'
    7 | while(n>0){
      | ^~~~~
a.cc:24:1: error: expected unqualified-id before 'if'
   24 | if(n<pow(10,i)-1 && n>pow(10,i-1)-1 &&i%2!=0){digits+=(n-(pow(10,i-1)-1)); }
      | ^~
a.cc:25:1: error: 'cout' does not name a type
   25 | cout<<digits;
      | ^~~~
a.cc:33:1: error: expected declaration before '}' token
   33 | }
      | ^
Language: C++

   int res=0;
int i=1;
int n;
cin>>n;
int digits=0;
bool reham=true;
while(n>0){

   if(n>=(pow(10,i)-1)) {
if(i>1)digits--;
       // n=n-((pow(10,i)-1)-res);
        digits+=(pow(10,i)-1)-res;

   }
   i+=2;

   res=(pow(10,i-1)-1);
//cout<<digits<<endl;

 if(n<(pow(10,i)-1)) {break;}

}
//cout<<digits<<endl;

if(n<pow(10,i)-1 && n>pow(10,i-1)-1 &&i%2!=0){digits+=(n-(pow(10,i-1)-1)); }
cout<<digits;







}


Compiler output:
a.cc:4:1: error: 'cin' does not name a type
    4 | cin>>n;
      | ^~~
a.cc:7:1: error: expected unqualified-id before 'while'
    7 | while(n>0){
      | ^~~~~
a.cc:25:1: error: expected unqualified-id before 'if'
   25 | if(n<pow(10,i)-1 && n>pow(10,i-1)-1 &&i%2!=0){digits+=(n-(pow(10,i-1)-1)); }
      | ^~
a.cc:26:1: error: 'cout' does not name a type
   26 | cout<<digits;
      | ^~~~
a.cc:34:1: error: expected declaration before '}' token
   34 | }
      | ^
Language: C++

 #include <bits/stdc++.h>
using namespace std;
int powr(int a,int b){int res = 1,i;for(i,1,b+1)res = res*a;return res;}

 int main(){
   int n,temp,x=0,sum=0;
cin>>n;
temp=n;
while(n!=0)
{
  n=n/10;
  x++;
}
if(x==1) cout<<temp;
else {
  for(int i=1;i<x;i+=2){
  sum=sum+9*powr(10,i-1);
  //cout << sum << endl;
  }
  if(x%2!=0) sum=sum+temp-pow(10,x-1)+1;
  cout<<sum;
}
 
 
 return 0;
}
 

Compiler output:
a.cc: In function 'int powr(int, int)':
a.cc:3:48: error: expected ';' before ')' token
    3 | int powr(int a,int b){int res = 1,i;for(i,1,b+1)res = res*a;return res;}
      |                                                ^
      |                                                ;
a.cc:3:61: error: expected primary-expression before 'return'
    3 | int powr(int a,int b){int res = 1,i;for(i,1,b+1)res = res*a;return res;}
      |                                                             ^~~~~~
a.cc:3:61: error: expected ';' before 'return'
    3 | int powr(int a,int b){int res = 1,i;for(i,1,b+1)res = res*a;return res;}
      |                                                             ^~~~~~
      |                                                             ;
a.cc:3:61: error: expected primary-expression before 'return'
    3 | int powr(int a,int b){int res = 1,i;for(i,1,b+1)res = res*a;return res;}
      |                                                             ^~~~~~
a.cc:3:61: error: expected ')' before 'return'
    3 | int powr(int a,int b){int res = 1,i;for(i,1,b+1)res = res*a;return res;}
      |                                        ~                    ^~~~~~
      |                                                             )
a.cc:3:72: warning: control reaches end of non-void function [-Wreturn-type]
    3 | int powr(int a,int b){int res = 1,i;for(i,1,b+1)res = res*a;return res;}
      |                                                                        ^
Language: C++

[11:13 PM, 2/29/2020] Adarsh Sir Cse: #include <bits/stdc++.h>
using namespace std;
[11:13 PM, 2/29/2020] Adarsh Sir Cse: int32_t main(){
   int n,temp,x=0,sum=0;
cin>>n;
temp=n;
while(n!=0)
{
  n=n/10;
  x++;
}
if(x==1) cout<<temp;
else {
  for(int i=1;i<x;i+=2){
  sum=sum+9*powr(10,i-1);
  //cout << sum << endl;
  }
  if(x%2!=0) sum=sum+temp-pow(10,x-1)+1;
  cout<<sum;
}
 
 
 return 0;
}
 int powr(int a,int b){int res = 1;fr(i,1,b+1)res = res*a;return res;}

Compiler output:
a.cc:1:39: error: stray '#' in program
    1 | [11:13 PM, 2/29/2020] Adarsh Sir Cse: #include <bits/stdc++.h>
      |                                       ^
a.cc:1:1: error: expected unqualified-id before '[' token
    1 | [11:13 PM, 2/29/2020] Adarsh Sir Cse: #include <bits/stdc++.h>
      | ^
a.cc:3:1: error: expected unqualified-id before '[' token
    3 | [11:13 PM, 2/29/2020] Adarsh Sir Cse: int32_t main(){
      | ^
a.cc: In function 'int powr(int, int)':
a.cc:25:39: error: 'i' was not declared in this scope
   25 |  int powr(int a,int b){int res = 1;fr(i,1,b+1)res = res*a;return res;}
      |                                       ^
a.cc:25:36: error: 'fr' was not declared in this scope
   25 |  int powr(int a,int b){int res = 1;fr(i,1,b+1)res = res*a;return res;}
      |                                    ^~
Language: C

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

#define   ipr         	pair<int, int>
#define   pb            push_back
#define   ff            first
#define   ss            second
#define   fr(i, j, k)   for (int i = j; i < k; i++)
#define   rf(i, j, k)   for (int i = j; i >= k;i--)
#define   int           long long
#define   ll 			unsigned long long
#define   ld            long double
#define   all(x)        x.begin(), x.end()
#define   rall(x)       x.rbegin(),x.rend()
#define   mp            make_pair
#define   inf           INT_MAX
#define   read_file();	freopen("input.txt", "r", stdin);	freopen("output.txt", "w", stdout);
#define   IOS           std::ios::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);

const int Maxn  =  2019;
const ld  pi   =  acos(-1);
const int mod =  1000000007;

template<class T> ostream& operator <<(ostream &out,vector<T> &A){for(auto x:A) out<<x<<" ";return out;}
template<class T> ostream& operator <<(ostream &out,set<T> &A){for(auto x:A) out<<x<<" ";return out;}
template <class T1,class T2>T1 powr(T1 a,T2 b){T1 res = 1;fr(i,1,b+1)res = res*a;return res;}


int32_t main(){
   int n,temp,x=0,sum=0;
cin>>n;
temp=n;
while(n!=0)
{
  n=n/10;
  x++;
}
if(x==1) cout<<temp;
else {
  for(int i=1;i<x;i+=2){
  sum=sum+9*powr(10,i-1);
  //cout << sum << endl;
  }
  if(x%2!=0) sum=sum+temp-pow(10,x-1)+1;
  cout<<sum;
}


 return 0;
}



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

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

int keta(int n){
  int count = 0;
  while(n >= 0){
    n = n%10;
    count++
  }
  return count;
}

int main(){
  int N;
  cin >> N;
  int count = 0;
  for(int i = 1; i < N; i++){
    int p = keta(i);
    if(p%2 == 1) count++;
  }
  cout << count << endl;
}

Compiler output:
a.cc: In function 'int keta(int)':
a.cc:8:12: error: expected ';' before '}' token
    8 |     count++
      |            ^
      |            ;
    9 |   }
      |   ~
Language: C++

#include "bits/stdc++.h"
#define REP(i, n) for(int i = 0; i < n; i++)
#define REPR(i, n) for(int i = n; i >= 0; i--)
#define FOR(i, m, n) for(int i = m; i < n; i++)
#define INF 2e9
#define MOD 1e9+7;
#define ALL(v) v.begin(), v.end()
using namespace std;
typedef long long LL;
typedef vector<int> VI;
typedef vector<string> VS;

int main(){
    int N;
    cin >> N;
    if (N < 10) {
        cout << N << endl;
        return 0
    }
    int keta = log10(N)+1;
    if (keta % 2 == 1){
        string hiku;
        for(int i = 0; i < keta-2; i+=2){
            hiku += "90";
        }
        cout << N - stoi(hiku) << endl;
    }
    else {
        string ans = "9";
        for (int i = 0; i < keta-2; i+=2){
            ans = "90" + ans;
        }
        cout << stoi(ans) << endl;
    }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:18:17: error: expected ';' before '}' token
   18 |         return 0
      |                 ^
      |                 ;
   19 |     }
      |     ~
Language: C

#include<stdio.h>
int main(){
	int N;
	scanf("%d", &N);
	if (N<10){
		printf("%d", N);
		return 0;
	}
	if(N>10 &&N<100){
		printf("9");
		return 0;
	}

	if(N>=100 && 1000>N){
		printf("%d", 9 + N - 99);
		return 0;
	}

	if(N>=1000 && 10000>N){
		printf("909");
		return 0;
	}

	if(N>=10000 && 100000>N){
		printf("%d"9+900+N-9999);
		return 0;
	}

	if(N==100000){
		printf("90909");
		return 0;
	}

	return 0;
}



Compiler output:
main.c: In function 'main':
main.c:25:28: error: expected ')' before numeric constant
   25 |                 printf("%d"9+900+N-9999);
      |                       ~    ^
      |                            )
Language: C++

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

int main() {
  int N;
  cin >> N;
  
  if(N == 100000){
    cout << 90909 << endl;
  }
  
  if(10000 <= N && N <= 99999){
    cout << 9 + 900 + N - 10000 + 1 << endl;
  }
  
  if(1000 <= N && N <= 9999){
    cout << 909 << endl;
  }
  
  if(100 <= N && N <= 999){
    cout << 9 + N - 100 + 1<< endl;
  }
  
  if(10 <= N && N <= 99){
    cout << 9 << endl;
  }
  
  if(1 <= N && N <= 9){
    cout << N << endl;
  }
  

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

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

int main(){
  int n;
  cin >> n;
  vector<int> p(n);
  for(int i=0;i<n;++i){
    cin >> p[i];
  }
  int k=0;
  for(int i=0;i<N;++i){
    if(p[i] != i+1) {
      k++;
    }
  }
  if(k <= 2) cout << "YES" << endl;
  else cout << "NO" << endl;
  return 0;
}


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

#include <iostream>
using namespace std;

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

	if (n < 10) {
		cout << n << endl;
		return 0;
	}

	int keta = 0;
	{
		int t = n;
		while (t != 0) {
			t /= 10;
			++keta;
		}
	}

	int ret = 0;
	if (keta % 2 == 1) {
		ret += n - static_cast<int>(pow(10, keta - 1)) + 1;
		keta -= 2;
	}
	else {
		keta -= 1;
	}

	while (keta != 1) {
		ret += static_cast<int>(pow(10, keta)) - static_cast<int>(pow(10, keta - 1));
		keta -= 2;
	}
	ret += 9;

	cout << ret << endl;

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:25:45: error: 'pow' was not declared in this scope
   25 |                 ret += n - static_cast<int>(pow(10, keta - 1)) + 1;
      |                                             ^~~
a.cc:33:41: error: 'pow' was not declared in this scope
   33 |                 ret += static_cast<int>(pow(10, keta)) - static_cast<int>(pow(10, keta - 1));
      |                                         ^~~
Language: C++

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

 int main() {
   int N;
   cin >> N;
   int res = 0;
   for (int i = 1; i < N+ 1; i++) {
     if (i.length() % 2 = 1) {
      res += 1;
     }
   }
   cout << res << '\n';
 }


Compiler output:
a.cc: In function 'int main()':
a.cc:9:12: error: request for member 'length' in 'i', which is of non-class type 'int'
    9 |      if (i.length() % 2 = 1) {
      |            ^~~~~~
Language: C++

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

int main(){
  int n,ans=0;
  cin>>n;
  for(int i=1; i<=n; i++){
    int m=log10(i)
    if(m%2==1) ans++;
  }
  cout<<ans<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:5: error: expected ',' or ';' before 'if'
    9 |     if(m%2==1) ans++;
      |     ^~
Language: C++

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

int main(){
  int n,ans=0;
  cin>>n;
  for(int i=1; i<=n; i++){
    if(log10(i)%2==1) ans++;
  }
  cout<<ans<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:16: error: invalid operands of types '__gnu_cxx::__enable_if<true, double>::__type' {aka 'double'} and 'int' to binary 'operator%'
    8 |     if(log10(i)%2==1) ans++;
      |        ~~~~~~~~^~
      |             |   |
      |             |   int
      |             __gnu_cxx::__enable_if<true, double>::__type {aka double}
Language: C++

#include<iostream>
int digit(int n){ int c=0;
  while(n!=0){ c++;n/=10;
  } return c;
}
int main(){
  int n,c=0; cin>>n;
  for(int i=1;i<=n;i++)
  if(digit(i)) c++;
  std::cout<<c; 
  return 0;
}  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  

Compiler output:
a.cc: In function 'int main()':
a.cc:7:14: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    7 |   int n,c=0; cin>>n;
      |              ^~~
      |              std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
Language: C++

#include<iostream>
int digit(int n){ int c=0;
  while(n!=0){ c++;n/=10;
  } return c;
}
int main(){
  int n,c=0; cin>>n;
  for(int i=1;i<=n;i++)
  if(digit(i)) c++;
  cout<<c; 
  return 0;
}  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  

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

#pragma gcc optimize("Ofast")
#include <bits/stdc++.h>

using namespace std;
using ll = long long;

#define FOR(i, a, b) for (int i = (a); i < (b); ++i)
#define REP(i, n) FOR(i, 0, n)
#define ALL(V) (V).begin(),(V).end()
#define SORT(V) sort(ALL(V)) //小さい方からソート
#define REV(V) reverse(ALL(V)) //リバース
#define RSORT(V) REV(SORT(V)) //大きい方からソート
#define NPN(V) next_permutation(ALL(V)) //順列
#define pb(n) push_back(n)
#define endl '\n'
#define Endl '\n'
#define DUMP(x)  cout << #x << " = " << (x) << endl
#define YES(n) cout << ((n) ? "YES" : "NO"  ) << endl
#define Yes(n) cout << ((n) ? "Yes" : "No"  ) << endl
#define RAPID cin.tie(0);ios::sync_with_stdio(false)
#define IN(n) cin >> n
#define IN2(a,b) cin >> a >> b
#define IN3(a,b,c) cin >> a >> b >> c 
#define VIN(V) for(int i = 0; i < (V).size(); i++) {cin >> (V).at(i);}
#define OUT(n) cout << n << endl
#define VOUT(V) for(int i = 0; i < (V).size(); i++) {cout << (V).at(i) << endl;}

// 型マクロ定義
#define int long long
#define P pair<ll,ll>
#define Vi vector<ll>
#define Vd vector<double>
#define Vs vector<string>
#define Vc vector<char>
#define M map<ll,ll>
#define S set<ll>
#define PQ priority_queue<ll>
#define PQG priority_queue<ll,V,greater<ll>
//

const int MOD = 1000000007;
const int INF = 1061109567;
const double EPS = 1e-10;
const double PI  = acos(-1.0);

int gcd(int a,int b){return b?gcd(b,a%b):a;} //最小公倍数

// デフォルト変数定義
int n,m,a,b,c=0,x,y,z;
double d,e,f;
string s,t;
//

signed main() {
  RAPID;
  IN(n);
  FOR(1,i,n+1){
    if(to_string(i).length() % 2 == 1) {
      c++;
    }
  }
  OUT(c);
}

Compiler output:
a.cc: In function 'int main()':
a.cc:57:7: error: expected unqualified-id before numeric constant
   57 |   FOR(1,i,n+1){
      |       ^
a.cc:7:31: note: in definition of macro 'FOR'
    7 | #define FOR(i, a, b) for (int i = (a); i < (b); ++i)
      |                               ^
a.cc:57:7: error: expected ';' before numeric constant
   57 |   FOR(1,i,n+1){
      |       ^
a.cc:7:31: note: in definition of macro 'FOR'
    7 | #define FOR(i, a, b) for (int i = (a); i < (b); ++i)
      |                               ^
a.cc:57:9: error: 'i' was not declared in this scope
   57 |   FOR(1,i,n+1){
      |         ^
a.cc:7:36: note: in definition of macro 'FOR'
    7 | #define FOR(i, a, b) for (int i = (a); i < (b); ++i)
      |                                    ^
a.cc:7:47: error: expected ')' before ';' token
    7 | #define FOR(i, a, b) for (int i = (a); i < (b); ++i)
      |                          ~                    ^
a.cc:57:3: note: in expansion of macro 'FOR'
   57 |   FOR(1,i,n+1){
      |   ^~~
a.cc:57:7: error: lvalue required as increment operand
   57 |   FOR(1,i,n+1){
      |       ^
a.cc:7:51: note: in definition of macro 'FOR'
    7 | #define FOR(i, a, b) for (int i = (a); i < (b); ++i)
      |                                                   ^
Language: C

#include <stdio.h>

int main(){
  int n;
  int i;
  int count=0;
  
  scanf("%d",&n);
  
  for(i=1;i<=n;i++){
    if(i>=1 || i<10){
      count++;
    } else if(i>=100 || i<1000){
      count++;
    } else if(i>=10000 || i<100000){
      count++;
    }
  }
  printf("%d",count);
  }
}

Compiler output:
main.c:21:1: error: expected identifier or '(' before '}' token
   21 | }
      | ^
Language: C++

#include<iostream>
#include<string.h>
using namespace std;
int main()
  {
  int i,count=0;
  string N;
  cin>>N;
  for(i=N;i<=0;i--)
    {
    int K=strlen(s);
    if(k%2!=0)
      {
      count++;
      }
    }
  cout<<count;
  return 0;
  }

Compiler output:
a.cc: In function 'int main()':
a.cc:9:9: error: cannot convert 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'int' in assignment
    9 |   for(i=N;i<=0;i--)
      |         ^
      |         |
      |         std::string {aka std::__cxx11::basic_string<char>}
a.cc:11:18: error: 's' was not declared in this scope
   11 |     int K=strlen(s);
      |                  ^
a.cc:12:8: error: 'k' was not declared in this scope
   12 |     if(k%2!=0)
      |        ^
Language: Java

import java.util.Scanner;

public class Main{
  public static void main(String args[]){
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    int ans = 0;
    for(int i = 1;i <= a;i++){
      if(i < 10 || i >= 100 && i < 1000 || i >= 10000 && i < 1000000) ans++;   
    }
    System.out.println(ans);
  }
}

Compiler output:
Main.java:8: error: cannot find symbol
    for(int i = 1;i <= a;i++){
                       ^
  symbol:   variable a
  location: class Main
1 error
Language: Java

import java.util.Scanner;
public class B_UnevenNumbers {

	public static void main(String[] args) {
		Scanner stdIn = new Scanner(System.in);
		
		int n = stdIn.nextInt();
		int cnt = 0;
		for(int i = 1; i <=n; i++) {
			int nn = String.valueOf(i).length();
			if(nn % 2 == 1) {
				cnt++;
			}
		}
		System.out.println(cnt);
		
		
	}

}


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

#include<iostream>
#include<cmath>
#include<string>
using namespace std;
int main(){
	int N;
  	cin >> N;
	string N1;
  	int siz;
  int res = 0;
  	for (int i = 1; i < N+1; i++){
      N1 = to_string(i);
      siz = N1.size();
      (siz % 2 == 1)? res +=1;
    }
  cout << res <<'\n';
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:30: error: expected ':' before ';' token
   14 |       (siz % 2 == 1)? res +=1;
      |                              ^
      |                              :
a.cc:14:30: error: expected primary-expression before ';' token
Language: C++

#include<iostream>
#include<cmath>
using namespace std;
int main(){
	int N;
  	cin >> N;
  	int N1 = N;
  	int i = 1, res = 0;
  
  	while(N1 > 9){
    	res += 9*pow(10, i-1);
      	i += 2;
      	N1 /= 100;      
    }
	
  if(N < 10) cout << N << '\n';
  else {
    
  	(N1 != 0)? res += N%pow(10, i)+1 : res = res;
    cout << res <<'\n';
  
  }
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:28: error: invalid operands of types 'int' and '__gnu_cxx::__promote<double>::__type' {aka 'double'} to binary 'operator%'
   19 |         (N1 != 0)? res += N%pow(10, i)+1 : res = res;
      |                           ~^~~~~~~~~~~
      |                           |    |
      |                           int  __gnu_cxx::__promote<double>::__type {aka double}
Language: C++

#include<iostream>
#include<cmath>
using namespace std;
int main(){
	int N;
  	cin >> N;
  	int N1 = N;
  	int i = 1, res = 0;
  
  	while(N1 > 9){
    	res += 9*pow(10, i-1);
      	i += 2;
      	N1 /= 100;      
    }
	
  if(N < 10) cout << N << '\n';
  else {
  	(n%2 == 1)? res += N%pow(10, i)+1 : res = res;
    cout << res <<'\n';
  
  }
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:10: error: 'n' was not declared in this scope
   18 |         (n%2 == 1)? res += N%pow(10, i)+1 : res = res;
      |          ^
a.cc:18:29: error: invalid operands of types 'int' and '__gnu_cxx::__promote<double>::__type' {aka 'double'} to binary 'operator%'
   18 |         (n%2 == 1)? res += N%pow(10, i)+1 : res = res;
      |                            ~^~~~~~~~~~~
      |                            |    |
      |                            int  __gnu_cxx::__promote<double>::__type {aka double}