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

#include <iostream>
#include <sstream>
#include <string>

using namespace std;

void readData(vector<string>& input_data){
}

int perseString(string line) {
    stringstream ss;
    ss << line;

    int a, b;
    ss >> a >> b;

    return a + b;
}

int countDigit(int n){
    int cnt = 1;

    while(n /= 10)
        ++cnt;

    return cnt;
}

void mainRoutine(){
    vector<string> input_data;

    readData(input_data);

    for(int i = 0; i < input_data.size(); ++i){
        auto ret = perseString("100 200");
        cout << countDigit(ret) << endl;
    }
}

int main() {
    mainRoutine();

    return 0;
}



Compiler output:
a.cc:7:6: error: variable or field 'readData' declared void
    7 | void readData(vector<string>& input_data){
      |      ^~~~~~~~
a.cc:7:15: error: 'vector' was not declared in this scope
    7 | void readData(vector<string>& input_data){
      |               ^~~~~~
a.cc:3:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
    2 | #include <sstream>
  +++ |+#include <vector>
    3 | #include <string>
a.cc:7:28: error: expected primary-expression before '>' token
    7 | void readData(vector<string>& input_data){
      |                            ^
a.cc:7:31: error: 'input_data' was not declared in this scope
    7 | void readData(vector<string>& input_data){
      |                               ^~~~~~~~~~
a.cc: In function 'void mainRoutine()':
a.cc:30:5: error: 'vector' was not declared in this scope
   30 |     vector<string> input_data;
      |     ^~~~~~
a.cc:30:5: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
a.cc:30:18: error: expected primary-expression before '>' token
   30 |     vector<string> input_data;
      |                  ^
a.cc:30:20: error: 'input_data' was not declared in this scope
   30 |     vector<string> input_data;
      |                    ^~~~~~~~~~
a.cc:32:5: error: 'readData' was not declared in this scope
   32 |     readData(input_data);
      |     ^~~~~~~~
Language: C++

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

int main(){
  vector<int> sum;
  vector<string> truss;
  int a,b;
    while(cin >> a >> b){
        int num = a + b;
        int count = 0;
        while(num){
            count++;
            num /= 10;
        }
        cout << count << endl;
    }
/*
sum.push_back(a+b);
  }
  for(int i=0;i<(int)sum.size();i++) { 
    truss.push_back(to_string(sum[i]));
  cout<<truss[i].size()<<endl;
*/
  }
  return 0;
}



Compiler output:
a.cc:26:3: error: expected unqualified-id before 'return'
   26 |   return 0;
      |   ^~~~~~
a.cc:27:1: error: expected declaration before '}' token
   27 | }
      | ^
Language: C++

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

int main() {
	double a, b;
	while (scanf("%d %d", &a, &b)){
		printf("%d\n",(int)log10(double)(a+b) + 1);
	}
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:42: error: expected primary-expression before 'double'
    7 |                 printf("%d\n",(int)log10(double)(a+b) + 1);
      |                                          ^~~~~~
Language: C++

#include<iostream>
using namespace std;
  
int main(){
    int a, b;
    int sum, digit;

    while(cin >> a >> b){
        sum = a + b;
        digit = 0;
        while(sum){
            sum = sum \ 10;
            digit++;
        };
    cout << digit << endl;
    };
    return 0;
}


Compiler output:
a.cc:12:23: error: stray '\' in program
   12 |             sum = sum \ 10;
      |                       ^
a.cc: In function 'int main()':
a.cc:12:22: error: expected ';' before numeric constant
   12 |             sum = sum \ 10;
      |                      ^  ~~
      |                      ;
Language: C++

#include<iostream>
using namespace std;

int main(){
    int a, b, sum, digit;
    while(cin >> a >> b){
        sum = a + b;
        digit = 0;
        while(digit){
            sum = sum \ 10;
            digit++;
        }
        if(digit == 0){ digit = 1; }
        cout << digit << endl;
    };
    return 0;
}


Compiler output:
a.cc:10:23: error: stray '\' in program
   10 |             sum = sum \ 10;
      |                       ^
a.cc: In function 'int main()':
a.cc:10:22: error: expected ';' before numeric constant
   10 |             sum = sum \ 10;
      |                      ^  ~~
      |                      ;
Language: C++

#include <iostream>

using namespace std;

int getDigitNumber(int n){
  return n > 0 ? 1 + getDigitNumber(n / 10) : 0;
}

int main(int argc, char const *argv[]) {
  while(){
    int a,b;
    cin >> a >> b;
    cout << getDigitNumber(a+b) << endl;
  }
  return 0;
}



Compiler output:
a.cc: In function 'int main(int, const char**)':
a.cc:10:9: error: expected primary-expression before ')' token
   10 |   while(){
      |         ^
Language: C++


A = []
B = []
s = True
while(s):
    try:
        a,b = map(int, input().split())
    except ValueError:
        break
    A.append(a)
    B.append(b)

for i in range(len(A)):
    sum = A[i] + B[i]
    digits = 1
    while(sum//10 != 0):
        digits += 1
        sum //= 10
    print(str(digits))


Compiler output:
a.cc:2:1: error: 'A' does not name a type
    2 | A = []
      | ^
Language: C++

#include<iostream>
#include<cstdio>
#include<string>
int main(){
    string a, b;
    while((cin >> a >> b) != EOF){
        printf("%d %d\n", a.length(), b.length());
    }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:5:5: error: 'string' was not declared in this scope
    5 |     string a, b;
      |     ^~~~~~
a.cc:5:5: note: suggested alternatives:
In file included from /usr/include/c++/14/iosfwd:41,
                 from /usr/include/c++/14/ios:40,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/stringfwd.h:77:33: note:   'std::string'
   77 |   typedef basic_string<char>    string;
      |                                 ^~~~~~
In file included from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44:
/usr/include/c++/14/string:76:11: note:   'std::pmr::string'
   76 |     using string    = basic_string<char>;
      |           ^~~~~~
a.cc:6:12: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    6 |     while((cin >> a >> b) != EOF){
      |            ^~~
      |            std::cin
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:6:19: error: 'a' was not declared in this scope
    6 |     while((cin >> a >> b) != EOF){
      |                   ^
a.cc:6:24: error: 'b' was not declared in this scope
    6 |     while((cin >> a >> b) != EOF){
      |                        ^
Language: C++

#include<iostream>
#include<cstdio>
#include<string>
int main(){
    string a, b;
    while(cin >> a >> b){
        printf("%d %d\n", a.length(), b.length());
    }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:5:5: error: 'string' was not declared in this scope
    5 |     string a, b;
      |     ^~~~~~
a.cc:5:5: note: suggested alternatives:
In file included from /usr/include/c++/14/iosfwd:41,
                 from /usr/include/c++/14/ios:40,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/stringfwd.h:77:33: note:   'std::string'
   77 |   typedef basic_string<char>    string;
      |                                 ^~~~~~
In file included from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44:
/usr/include/c++/14/string:76:11: note:   'std::pmr::string'
   76 |     using string    = basic_string<char>;
      |           ^~~~~~
a.cc:6:11: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    6 |     while(cin >> a >> b){
      |           ^~~
      |           std::cin
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:6:18: error: 'a' was not declared in this scope
    6 |     while(cin >> a >> b){
      |                  ^
a.cc:6:23: error: 'b' was not declared in this scope
    6 |     while(cin >> a >> b){
      |                       ^
Language: C++

#include<iostream>
#include<cstdio>
#include<string>
int main(){
    string a, b;
    while(cin >> a){
        cin >> b;
        printf("%d %d\n", a.length(), b.length());
    }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:5:5: error: 'string' was not declared in this scope
    5 |     string a, b;
      |     ^~~~~~
a.cc:5:5: note: suggested alternatives:
In file included from /usr/include/c++/14/iosfwd:41,
                 from /usr/include/c++/14/ios:40,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/stringfwd.h:77:33: note:   'std::string'
   77 |   typedef basic_string<char>    string;
      |                                 ^~~~~~
In file included from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44:
/usr/include/c++/14/string:76:11: note:   'std::pmr::string'
   76 |     using string    = basic_string<char>;
      |           ^~~~~~
a.cc:6:11: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    6 |     while(cin >> a){
      |           ^~~
      |           std::cin
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:6:18: error: 'a' was not declared in this scope
    6 |     while(cin >> a){
      |                  ^
a.cc:7:16: error: 'b' was not declared in this scope
    7 |         cin >> b;
      |                ^
Language: C++

#include<iostream>
#include<cstdio>
#include<string>
int main(){
    int a, b;
    while(cin >> a){
        cin >> b;
        string s = to_string(a+b);
        printf("%d\n", s.length());
    }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:6:11: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    6 |     while(cin >> a){
      |           ^~~
      |           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:9: error: 'string' was not declared in this scope
    8 |         string s = to_string(a+b);
      |         ^~~~~~
a.cc:8:9: note: suggested alternatives:
In file included from /usr/include/c++/14/iosfwd:41,
                 from /usr/include/c++/14/ios:40,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41:
/usr/include/c++/14/bits/stringfwd.h:77:33: note:   'std::string'
   77 |   typedef basic_string<char>    string;
      |                                 ^~~~~~
In file included from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44:
/usr/include/c++/14/string:76:11: note:   'std::pmr::string'
   76 |     using string    = basic_string<char>;
      |           ^~~~~~
a.cc:9:24: error: 's' was not declared in this scope
    9 |         printf("%d\n", s.length());
      |                        ^
Language: C++

#include<iostream>
#include<cstdio>
#include<string>
int main(){
    int a, b;
    while(cin >> a >> b){
        //cin >> b;
        string s = to_string(a+b);
        printf("%d\n", s.length());
    }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:6:11: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    6 |     while(cin >> a >> b){
      |           ^~~
      |           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:9: error: 'string' was not declared in this scope
    8 |         string s = to_string(a+b);
      |         ^~~~~~
a.cc:8:9: note: suggested alternatives:
In file included from /usr/include/c++/14/iosfwd:41,
                 from /usr/include/c++/14/ios:40,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41:
/usr/include/c++/14/bits/stringfwd.h:77:33: note:   'std::string'
   77 |   typedef basic_string<char>    string;
      |                                 ^~~~~~
In file included from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44:
/usr/include/c++/14/string:76:11: note:   'std::pmr::string'
   76 |     using string    = basic_string<char>;
      |           ^~~~~~
a.cc:9:24: error: 's' was not declared in this scope
    9 |         printf("%d\n", s.length());
      |                        ^
Language: C++

#include<iostream>
#include<cstdio>
#include<string>
int main(){
    int a, b;
    while(~scanf("%d%d", &a, &b)){
        string s = to_string(a+b);
        printf("%d\n", s.length());
    }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:9: error: 'string' was not declared in this scope
    7 |         string s = to_string(a+b);
      |         ^~~~~~
a.cc:7:9: note: suggested alternatives:
In file included from /usr/include/c++/14/iosfwd:41,
                 from /usr/include/c++/14/ios:40,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/stringfwd.h:77:33: note:   'std::string'
   77 |   typedef basic_string<char>    string;
      |                                 ^~~~~~
In file included from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44:
/usr/include/c++/14/string:76:11: note:   'std::pmr::string'
   76 |     using string    = basic_string<char>;
      |           ^~~~~~
a.cc:8:24: error: 's' was not declared in this scope
    8 |         printf("%d\n", s.length());
      |                        ^
Language: C++

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

int main(){
    long long a,b;
    while(cin >> a >> b;){
    long long sum = a + b;
    string str = to_string(sum);
    cout << str.length()<<endl;}
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:24: error: expected ')' before ';' token
    7 |     while(cin >> a >> b;){
      |          ~             ^
      |                        )
a.cc:7:25: error: expected primary-expression before ')' token
    7 |     while(cin >> a >> b;){
      |                         ^
Language: C++

#include<cstdio>
int main(){
	int n,n1,n2,count,a;
	while(sacnf("%d%d",&n1,&n2)!=EOF){
		count=0;
		a=n1+n2;
		while(a!=0){
			a=a/10;
			count++;
		}
	printf("%d",count);
	}
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:4:15: error: 'sacnf' was not declared in this scope; did you mean 'scanf'?
    4 |         while(sacnf("%d%d",&n1,&n2)!=EOF){
      |               ^~~~~
      |               scanf
Language: C++

#include <iostream>
using namespace std;
unsigned short digitsofnum(unsigned short n) {
	int j = 0;
	while (n > 0) {
		n = n / 10;
		j++;
	}
	return j;
}
int main()
{
	unsigned short a, b;
	vector<unsigned short> dst;
	while (cin >> a >> b)
		cout <<digitsofnum(a + b) << endl;
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:14:9: error: 'vector' was not declared in this scope
   14 |         vector<unsigned short> dst;
      |         ^~~~~~
a.cc:2:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
    1 | #include <iostream>
  +++ |+#include <vector>
    2 | using namespace std;
a.cc:14:16: error: expected primary-expression before 'unsigned'
   14 |         vector<unsigned short> dst;
      |                ^~~~~~~~
Language: C++

#coding:UTF-8

a=int(input())
b=int(input())

a+=b;
b=1
for num in range(1,8):
    b*=10
    if a<b:
        print(num)
        break



Compiler output:
a.cc:1:2: error: invalid preprocessing directive #coding
    1 | #coding:UTF-8
      |  ^~~~~~
a.cc:3:1: error: 'a' does not name a type
    3 | a=int(input())
      | ^
a.cc:7:1: error: 'b' does not name a type
    7 | b=1
      | ^
Language: C++

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

int main()
{ 
	int i1, i2;
	cin >> i1 >> i2;
	i1 += i2;
	i2 = 0;
	while (i1) {
		i2++;
		i1 /= 10;
	}
	cout << i2 << endl;
    return 0;
}


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

#include<iostream>
#include<cmath>

using namespace std;

int main(void){

 int a,b;
 int ans;

 while(1){
  cin >> a >> b;

  if(a==0 %% b==0)
   break;

  ans=log10(a+b)+1;
  cout << ans << endl;
 }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:14:12: error: expected primary-expression before '%' token
   14 |   if(a==0 %% b==0)
      |            ^
Language: C++

#include<iostream>
using namespace std;
int main (){
	int a,b,gou,p,i;
		gou=0;
		while(cin>>a>>b){
		gou=a+b;
		for(j=0;j<7;j++){
			if(gou>0){
				p++;
			}
			else if(gou<=0){
				break;
			}
			gou=gou/10;
		}
		cout<<p<<endl;
		p=0;
		}
	return 0;
}


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

import java.util.Scanner;

public class Main
{
	public static void main(String[] args)
	{
		Scanner cin = new Scanner(System.in);
		
		int a,b;

		while(true)
		{
			a=cin.nextInt();
			b=cin.nextInt();
			if(a==0 && b==0) break;
		
			String s = ((Integer)(a+b)).toString();		
			System.out.println(s.length());
		}
	}
}

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

import java.util.*;public class Main{public static void main(String[]a){Scanner s=new Scanner(System.in);for(int t=s.nextInt();t-->0;){int[]l=new int[3];for(int i=0;i<3;i++)l[i]=s.nextInt();Arrays.sort(l);System.out.println(l[0]*l[0]+l[1]*l[1]==l[2]*l[2]?"YES":"NO");}}}

Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import java.util.*;public class Main{public static void main(String[]a){Scanner s=new Scanner(System.in);for(int t=s.nextInt();t-->0;){int[]l=new int[3];for(int i=0;i<3;i++)l[i]=s.nextInt();Arrays.sort(l);System.out.println(l[0]*l[0]+l[1]*l[1]==l[2]*l[2]?"YES":"NO");}}}
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:1:20: error: expected unqualified-id before 'public'
    1 | import java.util.*;public class Main{public static void main(String[]a){Scanner s=new Scanner(System.in);for(int t=s.nextInt();t-->0;){int[]l=new int[3];for(int i=0;i<3;i++)l[i]=s.nextInt();Arrays.sort(l);System.out.println(l[0]*l[0]+l[1]*l[1]==l[2]*l[2]?"YES":"NO");}}}
      |                    ^~~~~~
Language: C++

#include <stdio.h>

int keta();
int kuriagari();
int maxKeta();

int main(void)
{	//statusªEOFðÔµ½çAüÍI¹(ctrl+z)
	int a,b,status,digit,temp;
	do{
		status=scanf("%d%d",&a,&b);
		;temp=keta(a,b);
		;digit=temp+kuriagari(a,b,temp);
		if (status!=EOF){
			printf("%d\n",keta(a+b));
		}
	}while(status!=EOF);
	return 0;
}

int keta(int a){
	int i=1,b=10;
	while (a/10>0 || b/10>0){
		a/=10;
		b/=10;
		i++;
	}
	return i;
}

int kuriagari(int a,int b,int i){
	int aAmari,bAmari,hoge;
	//maxKeta(a,&aAmari,i);
	//maxKeta(b,&bAmari,i);
	//printf ("%dÚF%dÆ%d\n",i,a,b);
	//printf ("	AÌ ÜèF%d  BÌ ÜèF%d\n",aAmari,bAmari);
	if (i==0){
		return 0;
	}else{
		//printf("%d+%dÈÌÅ%dðÔµÜ·B\n",maxKeta(a,&aAmari,i),maxKeta(b,&bAmari,i),hoge=(maxKeta(a,&aAmari,i)+maxKeta(b,&bAmari,i)+ kuriagari(a-aAmari,b-bAmari,i-1))/10);
		return (maxKeta(a,&aAmari,i)+maxKeta(b,&bAmari,i)+ kuriagari(a-aAmari,b-bAmari,i-1))/10;
	}
}
	
int maxKeta(int a,int *aAmari,int i){
	int maxKetaA=a;
	*aAmari=1;
	for(;i>1;i--){
		//printf("%d|",*aAmari);
		maxKetaA/=10;
		*aAmari*=10;
	}
	*aAmari*=maxKetaA;
	return maxKetaA;
}
	

Compiler output:
a.cc: In function 'int main()':
a.cc:12:27: error: too many arguments to function 'int keta()'
   12 |                 ;temp=keta(a,b);
      |                       ~~~~^~~~~
a.cc:3:5: note: declared here
    3 | int keta();
      |     ^~~~
a.cc:13:38: error: too many arguments to function 'int kuriagari()'
   13 |                 ;digit=temp+kuriagari(a,b,temp);
      |                             ~~~~~~~~~^~~~~~~~~~
a.cc:4:5: note: declared here
    4 | int kuriagari();
      |     ^~~~~~~~~
a.cc:15:43: error: too many arguments to function 'int keta()'
   15 |                         printf("%d\n",keta(a+b));
      |                                       ~~~~^~~~~
a.cc:3:5: note: declared here
    3 | int keta();
      |     ^~~~
a.cc: In function 'int kuriagari(int, int, int)':
a.cc:41:32: error: too many arguments to function 'int maxKeta()'
   41 |                 return (maxKeta(a,&aAmari,i)+maxKeta(b,&bAmari,i)+ kuriagari(a-aAmari,b-bAmari,i-1))/10;
      |                         ~~~~~~~^~~~~~~~~~~~~
a.cc:5:5: note: declared here
    5 | int maxKeta();
      |     ^~~~~~~
a.cc:41:53: error: too many arguments to function 'int maxKeta()'
   41 |                 return (maxKeta(a,&aAmari,i)+maxKeta(b,&bAmari,i)+ kuriagari(a-aAmari,b-bAmari,i-1))/10;
      |                                              ~~~~~~~^~~~~~~~~~~~~
a.cc:5:5: note: declared here
    5 | int maxKeta();
      |     ^~~~~~~
Language: C++

import java.util.*;

class Main{
    public static void main(String[] args){
    	Scanner scn = new Scanner(System.in);
    	int a,b;
    	
    	for(;;){
    		a = scn.nextInt();
    		b = scn.nextInt();
    		
    		int i = a + b;
    		int count = 1;
    		
    		for(; i>=10;i/=10,count++);
    		
    		System.out.println(count);
    		
    	}
    }
}

Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import java.util.*;
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:4:11: error: expected ':' before 'static'
    4 |     public static void main(String[] args){
      |           ^~~~~~~
      |           :
a.cc:4:29: error: 'String' has not been declared
    4 |     public static void main(String[] args){
      |                             ^~~~~~
a.cc:4:38: error: expected ',' or '...' before 'args'
    4 |     public static void main(String[] args){
      |                                      ^~~~
a.cc:21:2: error: expected ';' after class definition
   21 | }
      |  ^
      |  ;
a.cc: In static member function 'static void Main::main(int*)':
a.cc:5:9: error: 'Scanner' was not declared in this scope
    5 |         Scanner scn = new Scanner(System.in);
      |         ^~~~~~~
a.cc:9:21: error: 'scn' was not declared in this scope
    9 |                 a = scn.nextInt();
      |                     ^~~
a.cc:17:17: error: 'System' was not declared in this scope
   17 |                 System.out.println(count);
      |                 ^~~~~~
Language: C++

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

int main()
{
	int a,b;
	while(cin>>a>>b){
		int k=1,stac=a+b;
		while(stac>10){
			stac/=10;
			k++;
		}
		cout<<k<<"\n";
	}
}

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

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

int main()
{
	ifstream fin(argc[1]);
	int a,b;
	int wa;
	while( !fin.eof() ) {
		int count = 0;
		fin >> a >> b;
		wa = a + b;
		while(0){
			if(wa / 10 == 0){
				cout << count << endl;
				break;
			}
			wa/=10;
			count++;
		}
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:22: error: 'argc' was not declared in this scope
    7 |         ifstream fin(argc[1]);
      |                      ^~~~
Language: C++

#include <iostream>
#include <sstream>
#include <string>

using namespace std;

int counts(string num) {
	int count = 0;
	for (int i = 0; i < ; i++) {
		if (num[i] != "0") count++;
	}
	return count;
}

int main() {
	for (int a, b; cin >> a >> b && a && b) {
		string stream as;
		as << a;
		string stream bs;
		bs << b;
		cout << counts(as)+counts(bs) << endl;
	}
}

Compiler output:
a.cc: In function 'int counts(std::string)':
a.cc:9:29: error: expected primary-expression before ';' token
    9 |         for (int i = 0; i < ; i++) {
      |                             ^
a.cc:10:28: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   10 |                 if (num[i] != "0") count++;
a.cc: In function 'int main()':
a.cc:16:47: error: expected ';' before ')' token
   16 |         for (int a, b; cin >> a >> b && a && b) {
      |                                               ^
      |                                               ;
a.cc:17:31: error: expected initializer before 'as'
   17 |                 string stream as;
      |                               ^~
a.cc:18:17: error: 'as' was not declared in this scope; did you mean 'a'?
   18 |                 as << a;
      |                 ^~
      |                 a
a.cc:19:31: error: expected initializer before 'bs'
   19 |                 string stream bs;
      |                               ^~
a.cc:20:17: error: 'bs' was not declared in this scope; did you mean 'b'?
   20 |                 bs << b;
      |                 ^~
      |                 b
Language: C++

#include <iostream>
#include <sstream>
#include <string>

using namespace std;

int counts(string num) {
	int count = 0;
	for (int i = 0; i < size(num); i++) {
		if (num[i] != "0") count++;
	}
	return count;
}

int main() {
	for (int a, b; cin >> a >> b && a && b) {
		string stream as;
		as << a;
		string stream bs;
		bs << b;
		cout << counts(as)+counts(bs) << endl;
	}
}

Compiler output:
a.cc: In function 'int counts(std::string)':
a.cc:10:28: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   10 |                 if (num[i] != "0") count++;
a.cc: In function 'int main()':
a.cc:16:47: error: expected ';' before ')' token
   16 |         for (int a, b; cin >> a >> b && a && b) {
      |                                               ^
      |                                               ;
a.cc:17:31: error: expected initializer before 'as'
   17 |                 string stream as;
      |                               ^~
a.cc:18:17: error: 'as' was not declared in this scope; did you mean 'a'?
   18 |                 as << a;
      |                 ^~
      |                 a
a.cc:19:31: error: expected initializer before 'bs'
   19 |                 string stream bs;
      |                               ^~
a.cc:20:17: error: 'bs' was not declared in this scope; did you mean 'b'?
   20 |                 bs << b;
      |                 ^~
      |                 b
Language: C++

#include <iostream>

using namespace std;

int counts(char[] num) {
	int count = 0;
	for (int i = 0; i < num.length; i++) {
		if (num[i] != "0") count++;
	}
	return count;
}

int main() {
	for (int a, b; cin >> a >> b && a && b) {
	  char[] as = (char[])a;
	  char[] bs = (char[])b;
		cout << counts(as)+counts(bs) << endl;
	}
}

Compiler output:
a.cc:5:19: error: expected ',' or '...' before 'num'
    5 | int counts(char[] num) {
      |                   ^~~
a.cc: In function 'int counts(char*)':
a.cc:7:29: error: 'num' was not declared in this scope; did you mean 'enum'?
    7 |         for (int i = 0; i < num.length; i++) {
      |                             ^~~
      |                             enum
a.cc: In function 'int main()':
a.cc:14:47: error: expected ';' before ')' token
   14 |         for (int a, b; cin >> a >> b && a && b) {
      |                                               ^
      |                                               ;
a.cc:15:15: error: structured binding declaration cannot have type 'char'
   15 |           char[] as = (char[])a;
      |               ^~
a.cc:15:15: note: type must be cv-qualified 'auto' or reference to cv-qualified 'auto'
a.cc:15:15: error: empty structured binding declaration
a.cc:15:18: error: expected initializer before 'as'
   15 |           char[] as = (char[])a;
      |                  ^~
a.cc:16:15: error: structured binding declaration cannot have type 'char'
   16 |           char[] bs = (char[])b;
      |               ^~
a.cc:16:15: note: type must be cv-qualified 'auto' or reference to cv-qualified 'auto'
a.cc:16:15: error: empty structured binding declaration
a.cc:16:18: error: expected initializer before 'bs'
   16 |           char[] bs = (char[])b;
      |                  ^~
a.cc:17:32: error: 'as' was not declared in this scope; did you mean 'a'?
   17 |                 cout << counts(as)+counts(bs) << endl;
      |                                ^~
      |                                a
a.cc:17:43: error: 'bs' was not declared in this scope; did you mean 'b'?
   17 |                 cout << counts(as)+counts(bs) << endl;
      |                                           ^~
      |                                           b
Language: C++

#include <iostream>

using namespace std;

int main() {
	for (int a, b; cin >> a >> b && a && b) {
		a += b;
		int count = 0;
		for (; a > 0; a /= 10)
			count++;
		cout << count << endl;
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:47: error: expected ';' before ')' token
    6 |         for (int a, b; cin >> a >> b && a && b) {
      |                                               ^
      |                                               ;
Language: C++

#include <iostream>

using namespace std;

int main() {
	for (int a, b; cin >> a >> b && a && b) {
		a += b;
		int count = 0;
		for (; a > 0; a /= 10) {
			count++;
		}
		cout << count << endl;
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:47: error: expected ';' before ')' token
    6 |         for (int a, b; cin >> a >> b && a && b) {
      |                                               ^
      |                                               ;
Language: C++

int toLowUnder10(int arg) {
	return (10 > arg) ? arg : (toLowUnder10(arg/10) + 1) ;
}

int main (int argc, char *argv[]) {
	int a,b;
	while (EOF != fscanf(stdin, "%d %d", &a, &b)) {
		printf("%d\n", toLowUnder10(a+b));
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main(int, char**)':
a.cc:7:16: error: 'EOF' was not declared in this scope
    7 |         while (EOF != fscanf(stdin, "%d %d", &a, &b)) {
      |                ^~~
a.cc:1:1: note: 'EOF' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
  +++ |+#include <cstdio>
    1 | int toLowUnder10(int arg) {
a.cc:7:30: error: 'stdin' was not declared in this scope
    7 |         while (EOF != fscanf(stdin, "%d %d", &a, &b)) {
      |                              ^~~~~
a.cc:7:30: note: 'stdin' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
a.cc:7:23: error: 'fscanf' was not declared in this scope
    7 |         while (EOF != fscanf(stdin, "%d %d", &a, &b)) {
      |                       ^~~~~~
a.cc:8:17: error: 'printf' was not declared in this scope
    8 |                 printf("%d\n", toLowUnder10(a+b));
      |                 ^~~~~~
a.cc:8:17: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
Language: C++

import java.util.*;

public class Main {
    public static void main(String[] args) {
	Scanner s = new Scanner(System.in);
	while(s.hasNext()) {
	    int sum = s.nextInt() + s.nextInt();
	    System.out.println(String.valueOf(sum).length());
	}
    }
}

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

import java.util.*;
import static java.util.Arrays.*;
import static java.lang.Math.*;
public class Main {

	static Scanner sc = new Scanner(System.in);
	
	public static void main(String[] args) {
		while (read()) {
			solve();
		}
	}
	
	static int a, b;
	static boolean read() {
		if (!sc.hasNextInt()) return false;
		a = sc.nextInt(); b = sc.nextInt();
		return true;
	}
	
	static void solve() {
		int sum = a + b, res = 0;
		while (sum > 0) {
			sum /= 10;
			res++;
		}
		System.out.println(res);
	}
}

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

#include <iostream>
#include <string>
#include <stdio.h>
#include <strstream.h>
#include <math.h>

using namespace std;

int main()
{
	string tmp;
	int nspace;
	do
	{
		getline(cin,tmp);
		if(cin.eof()) break;
		nspace=tmp.find(" ");

		string astring=tmp.substr(0,nspace);
		string bstring=tmp.substr(nspace+1);

		istrstream astr(astring.data());
		istrstream bstr(bstring.data());

		int a,b;

		astr>>a;
		bstr>>b;

		int a_keta=(int)log10(a)+1;
		int b_keta=(int)log10(b)+1;

		cout<<a_keta+b_keta;
		
				 
	}while(1);

	
	return 0;
}
		

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

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

using namespace std;

int main()
{
	string tmp;
	int nspace;
	do
	{
if(cin.eof()) break;
		getline(cin,tmp);
		nspace=tmp.find(" ");

		string astring=tmp.substr(0,nspace);
		string bstring=tmp.substr(nspace+1);

		istrstream astr(astring.data());
		istrstream bstr(bstring.data());

		int a,b;

		astr>>a;
		bstr>>b;

		int a_keta=(int)log10(a)+1;
		int b_keta=(int)log10(b)+1;

		cout<<a_keta+b_keta;
		
				 
	}while(1);

	
	return 0;
}

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

#include<cstdio>

int main(){
int a,b;
 while(scanf("%d%d",&a,&b)){
 print("%d\n",a+b);
}
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:2: error: 'print' was not declared in this scope; did you mean 'printf'?
    6 |  print("%d\n",a+b);
      |  ^~~~~
      |  printf
Language: C++

#include <stdio.h>

int main(){
  int a, b, c;
  int keta;

  while(cin >> a){
    cin >> b;
    c=a+b;
    keta=1;
    while((c/=10)>0) keta++;
    printf("%d\n", keta);
  }
  
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:9: error: 'cin' was not declared in this scope
    7 |   while(cin >> a){
      |         ^~~
Language: C++

#include <iostream>

int main(){
  int a, b, c;
  int keta;

  while(cin >> a){
    cin >> b;
    c=a+b;
    keta=1;
    while((c/=10)>0) keta++;
    printf("%d\n", keta);
  }
  
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:9: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    7 |   while(cin >> a){
      |         ^~~
      |         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 main(){
  int a, b, c;
  int keta;

  while(cin >> a b){
    c=a+b;
    keta=1;
    while((c/=10)>0) keta++;
    printf("%d\n", keta);
  }
  
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:9: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    7 |   while(cin >> a b){
      |         ^~~
      |         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:7:17: error: expected ')' before 'b'
    7 |   while(cin >> a b){
      |        ~        ^~
      |                 )
a.cc:7:19: error: expected ';' before ')' token
    7 |   while(cin >> a b){
      |                   ^
      |                   ;
Language: C++

#include <iostream>
using namespace std;

int main(){
  int a, b, c;
  int keta;

  while(cin >> a){
    cin >> b
    c=a+b;
    keta=1;
    while((c/=10)>0) keta++;
    printf("%d\n", keta);
  }
  
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:13: error: expected ';' before 'c'
    9 |     cin >> b
      |             ^
      |             ;
   10 |     c=a+b;
      |     ~
Language: C++

#include <iostream>
using namespace std;

int main(){
  int a, b, c;
  int keta;

  while(cin >> a){
    cin >> b
    c=a+b;
    keta=1;
    while((c/=10)>0) keta++;
    cout << keta << endl;
  }
  
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:13: error: expected ';' before 'c'
    9 |     cin >> b
      |             ^
      |             ;
   10 |     c=a+b;
      |     ~
Language: C++

<stdio.h>
main(){
  int a,b,i,sum;
  while(scanf("%d",&a)!=EOF){
    scanf("%d",&b);
    sum=a+b;
    for(i=1;sum>1;i++)
      sum=sum/10;
    printf("%d\n",i);
  }
  return(0);
}

Compiler output:
a.cc:1:1: error: expected unqualified-id before '<' token
    1 | <stdio.h>
      | ^
Language: C++

#include<stdio.h>

int main(){
 int a,b,c;
 while(~scanf("%d%d",&a,&b);){
 c=0;
 a+=b;
 while(a){
 a/=10;
 c++;
}
printf("%d\n",c);
}
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:28: error: expected ')' before ';' token
    5 |  while(~scanf("%d%d",&a,&b);){
      |       ~                    ^
      |                            )
a.cc:5:29: error: expected primary-expression before ')' token
    5 |  while(~scanf("%d%d",&a,&b);){
      |                             ^
Language: C++

#include<stdio.h>


int main(){
	char a[21];
	char b[21];
	int A;
	int B;
	int i;
	int l=1;
	fgets(ツ　a,sizeof(a),stdinツ　);
	fgets(ツ　b,sizeof(b),stdinツ　);
	sscanf(a,"%dツ”, &A);
	sscanf(b,"%d", &B);
	i=A+B;
	while(i  >= 10){
		i=i/10;
		l=l+1;
	}
	printf("%d" ,l);
}

Compiler output:
a.cc:11:15: error: extended character 　 is not valid in an identifier
   11 |         fgets(ツ　a,sizeof(a),stdinツ　);
      |               ^
a.cc:11:31: error: extended character 　 is not valid in an identifier
   11 |         fgets(ツ　a,sizeof(a),stdinツ　);
      |                               ^
a.cc:12:15: error: extended character 　 is not valid in an identifier
   12 |         fgets(ツ　b,sizeof(b),stdinツ　);
      |               ^
a.cc:12:31: error: extended character 　 is not valid in an identifier
   12 |         fgets(ツ　b,sizeof(b),stdinツ　);
      |                               ^
a.cc:13:18: warning: missing terminating " character
   13 |         sscanf(a,"%dツ”, &A);
      |                  ^
a.cc:13:18: error: missing terminating " character
   13 |         sscanf(a,"%dツ”, &A);
      |                  ^~~~~~~~~~~~
a.cc: In function 'int main()':
a.cc:11:15: error: '\U000030c4\U00003000a' was not declared in this scope
   11 |         fgets(ツ　a,sizeof(a),stdinツ　);
      |               ^~~~~
a.cc:11:31: error: 'stdin\U000030c4\U00003000' was not declared in this scope
   11 |         fgets(ツ　a,sizeof(a),stdinツ　);
      |                               ^~~~~~~~~
a.cc:12:15: error: '\U000030c4\U00003000b' was not declared in this scope
   12 |         fgets(ツ　b,sizeof(b),stdinツ　);
      |               ^~~~~
a.cc:14:27: error: expected ')' before ';' token
   14 |         sscanf(b,"%d", &B);
      |                           ^
      |                           )
a.cc:13:15: note: to match this '('
   13 |         sscanf(a,"%dツ”, &A);
      |               ^
Language: C++

#include<stdio.h>


int main(){
	char a[21];
	char b[21];
	int A;
	int B;
	int i;
	int l=1;
	fgets(a,sizeof(a),stdin);
	fgets(b,sizeof(b),stdin);
	sscanf(a,"%dツ”, &A);
	sscanf(b,"%d", &B);
	i=A+B;
	while(i  >= 10){
		i=i/10;
		l=l+1;
	}
	printf("%d" ,l);
}

Compiler output:
a.cc:13:18: warning: missing terminating " character
   13 |         sscanf(a,"%dツ”, &A);
      |                  ^
a.cc:13:18: error: missing terminating " character
   13 |         sscanf(a,"%dツ”, &A);
      |                  ^~~~~~~~~~~~
a.cc: In function 'int main()':
a.cc:14:27: error: expected ')' before ';' token
   14 |         sscanf(b,"%d", &B);
      |                           ^
      |                           )
a.cc:13:15: note: to match this '('
   13 |         sscanf(a,"%dツ”, &A);
      |               ^
Language: C++

#include<stdio.h>


int main(void){
	char a[21];
	char b[21];
	int A;
	int B;
	int i;
	int l=1;
	fgets(a,sizeof(a),stdin);
	fgets(b,sizeof(b),stdin);
	sscanf(a,"%dツ”, &A);
	sscanf(b,"%d", &B);
	i=A+B;
	while(i  >= 10){
		i=i/10;
		l=l+1;
	}
	printf("%d" ,l);
}

Compiler output:
a.cc:13:18: warning: missing terminating " character
   13 |         sscanf(a,"%dツ”, &A);
      |                  ^
a.cc:13:18: error: missing terminating " character
   13 |         sscanf(a,"%dツ”, &A);
      |                  ^~~~~~~~~~~~
a.cc: In function 'int main()':
a.cc:14:27: error: expected ')' before ';' token
   14 |         sscanf(b,"%d", &B);
      |                           ^
      |                           )
a.cc:13:15: note: to match this '('
   13 |         sscanf(a,"%dツ”, &A);
      |               ^
Language: C++

#include<iostream>                                                                 
#include<stdio.h>                                                                  
                                                                                   
                                                                                   
int main(void){                                                                    
  int x,y,z,keta=0;                                                                
  scanf("%d %d",&x,&y);                                                            
  z =x+y;                                                                          
  while(z>0){                                                                      
    z = z/10;                                                                      
    keta++;                                                                        
  }                                                                                
  std::cout << keta << std::endl;                                                  
  return 0;                                                                        
}   #include<iostream>                                                             
#include<stdio.h>                                                                  
                                                                                   
                                                                                   
int main(void){                                                                    
  int x,y,z,keta=0;                                                                
  scanf("%d %d",&x,&y);                                                            
  z =x+y;                                                                          
  while(z>0){                                                                      
    z = z/10;                                                                      
    keta++;                                                                        
  }                                                                                
  std::cout << keta << std::endl;                                                  
  return 0;                                                                        
}

Compiler output:
a.cc:15:5: error: stray '#' in program
   15 | }   #include<iostream>
      |     ^
a.cc:15:6: error: 'include' does not name a type
   15 | }   #include<iostream>
      |      ^~~~~~~
Language: C++

#include<stdio.h>                                                                  
                                                                                   
                                                                                   
int main(void){                                                                    
  int x,y,z,keta=0;                                                                
  scanf("%d %d",&x,&y);                                                            
  z =x+y;                                                                          
  while(z>0){                                                                      
    z = z/10;                                                                      
    keta++;                                                                        
  }                                                                                
  std::cout << keta << std::endl;                                                  
  return 0;                                                                        
} 

Compiler output:
a.cc: In function 'int main()':
a.cc:12:8: error: 'cout' is not a member of 'std'
   12 |   std::cout << keta << std::endl;
      |        ^~~~
a.cc:2:1: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    1 | #include<stdio.h>
  +++ |+#include <iostream>
    2 | 
a.cc:12:29: error: 'endl' is not a member of 'std'
   12 |   std::cout << keta << std::endl;
      |                             ^~~~
a.cc:2:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
    1 | #include<stdio.h>
  +++ |+#include <ostream>
    2 |
Language: C++

include<iostream>                                                                 
                                                                                   
int main(void){                                                                    
  int a,b,c,i=0;                                                                   
  std::cin >> a >> b;                                                              
  c =a+b;                                                                          
 FLAG:                                                                             
    c =c/10;                                                                       
    i++;                                                                           
    if(0<c){                                                                       
      goto FLAG;                                                                   
    }                                                                              
  std::cout << i << std::endl;                                                     
  return 0;                                                                        
}

Compiler output:
a.cc:1:1: error: 'include' does not name a type
    1 | include<iostream>
      | ^~~~~~~