Go: package main

import (
	"bufio"
	"fmt"
	"math"
	"os"
	"strconv"
)

var scanner = bufio.NewScanner(os.Stdin)

func nextString() string {
	scanner.Scan()
	return scanner.Text()
}

func nextInt() (int, error) {
	return strconv.Atoi(nextString())

}

func main() {
	scanner.Split(bufio.ScanWords)

	for {
		a, err := nextInt()
		if err != nil {
			break
		}
		b, _ := nextInt()

		s := a + b
		nDigits := int(math.Log10(float64(s))) + 1
		fmt.Println(nDigits)
	}
}

C++: #include<iostream>
using namespace std;

int log10(int);
int main()
{
	int a,b;
	while(cin >> a >> b){
	cout << log10(a+b) << endl;
	}
	return 0;
}

int log10(int x)
{
	int i = 1;
	while(1){
		if(x/10 >= 1){
			i++;
			x = x / 10;
		}else{
			break;
		}
	}
	return i;
}

C++: #include <iostream>
#include <cstdio>

using namespace std;

int main() {
    int a, b;
    char c[10];
    while (cin >> a >> b) {
        sprintf(c, "%d", a+b);
        int i = 0;
        while (c[i] != '\0') {
            ++i;
        }

        cout << i << endl;
    }

    return 0;
}

C++: #include<iostream>
#include<string>
using namespace std;
int main(){
	int a,b;
	int c1=1,c2=1;
	while(cin>>a>>b){
		while(1){
			if(a%10==0)
				++c1;
			else
				break;
		}
		while(1){
			if(b%10==0)
				++c2;
			else
				break;
		}
	}
		cout<<c1+c2<<endl;
    return 0;
}

C++: #include<iostream>
#include<cstdio>
using namespace std;
int length(int);
int main()
{
	int x[200][2],i=0;
	while(scanf("%d %d",&x[i][0],&x[i][1])!=EOF)
	{
		if(i<200)
		{
			i++;
	    }
	}
	for(int j=0;j<i;j++)
	{
		cout<<length(x[j][0]+x[j][1])<<endl;
	}
	return 0;
 } 
int length(int x)
{
	int t;
	for( t=0;x>0;t++)
	{
		x=x/10;
	}
	return t;
}

C++: #include <iostream>
using namespace std;

int main() {
	int a, b;
	cin >> a >> b;
	if (a + b < 10) cout << "1" << endl;
	else if (a + b < 100) cout << "2" << endl;
	else if (a + b < 1000) cout << "3" << endl;
	else if (a + b < 10000) cout << "4" << endl;
	else if (a + b < 100000) cout << "5" << endl;
	else if (a + b < 1000000) cout << "6" << endl;
	else if (a + b < 10000000) cout << "7" << endl;
	else if (a + b < 100000000) cout << "8" << endl;
	else if (a + b < 10000000000) cout << "9" << endl;
return 0;
}

C++: #include <iostream>
#include <cstdio>
#include <cstdlib>
#include <math.h>
#include <vector>
#include <queue>
#include <algorithm>
#include <iterator>
#include <sstream>
#include <string>
using namespace std;
#define rep(I,N) for(int I = 0; I < (int)(N); I++)
#define FIN(V) cout<<V<<endl
#define pb push_back
#define INF (1 << 30)
typedef pair<int, int> P;
typedef long long ll;
typedef priority_queue<int> pq;

int main(void){
	int a;
	while(cin>>a){
		int b;
		cin >> a;
		int c = a + b;
		stringstream ss;
		string s;
		ss << c;
		s = ss.str();
		cout << s.size()+1 << endl;
	}


	return 0;	
}

C++: #include <iostream>
#include <cmath>
using namespace std;

int main() {
  while (1) {
    int a, b;
    cin >> a >> b;
    int digit = log10(a+b) + 1;
    cout << digit << endl;
  }
}

C++: #include <iostream>
using namespace std;

int main(){
  int a,b;
  cin>>a>>b;
  cout<<(a+b)/10+1<<endl;
  return 0;
}

C++: #include <stdio.h>

int main() {
    
    int l, m, n, i;
    
    scanf("%d %d", &l, &m);
    n = l + m;
    
    for (i = 1; n >= 9; i++) {
        n /= 10;
    }
    
    
    printf("%d\n", i);
    
    return 0;
}

C++: #include <iostream>
#include <cstdio>
#include <cstdlib>
#include <cctype>
#include <cstring>
#include <sstream>
#include <string>
#include <vector>
#include <map>
#include <set>
#include <list>
#include <stack>
#include <queue>
#include <algorithm>
#include <complex>
#include <iterator>
using namespace std;

typedef pair<int, int> pii;
typedef long long ll;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<string> vs;

#define all(c) (c).begin(), (c).end()
#define rall(c) (c).rbegin(), (c).rend()
#define tr(c, i) for(auto i = (c).begin(); i != (c).end(); i++)
#define rtr(c, i) for(auto i = (c).rbegin(); i != (c).rend(); i++)
#define repfn(i, a, cont, next) \
  for(auto i = (a); [=](){return(cont);}(); i = [=](){return(next);}())
#define repby(i, a, b, step) repfn(i, a, i < b, i + step)
#define repab(i, a, b) repby(i, (a), (b), 1)
#define rep(i, n) repab(i, 0, (n))
#define pb push_back
#define sz(c) int((c).size())

int digits(int x)
{
  if (x < 10)
    return 1;
  else
    return 1 + digits(x / 10);
}

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

C++: #include <bits/stdc++.h>

using namespace std;

int main() {
  int a, b;
  while (cin >> a >> b) {
    stringstream ss;
    ss << a + b;
    cout << ss.str().size() << endl;
  }
}

C++: // 2011/05/26 Tazoe

#include <iostream>
using namespace std;

int main()
{
	while(true){
		int a, b;
		cin >> a;
		if(cin.eof())
			break;
		cin >> b;

		int sum = a+b;

		int cnt = 0;
		while(sum>0){
			cnt++;
			sum /= 10;
		}

		cout << cnt << endl;
	}

	return 0;
}

C++: 
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main {
	public static void main(String[] a) {
		BufferedReader br;
		br = new BufferedReader(new InputStreamReader(System.in));
		int[] num = new int[2];
		try {
			String str = br.readLine();
			String[] array = str.split(" ");
			for(int h=0;h<array.length/2;h++){
			for (int i = 0; i < 2; i++) {
				num[i] = Integer.parseInt(array[i+h*2]);
			}
			int answer =(int)Math.log10( num[0]+num[1])+ 1;
			System.out.println(answer);
			}
		} catch (IOException e) {
			e.printStackTrace();
		}

	}
}

C++: #include<stdio.h>
int main(void)
{
	int i,j,temp,y[10];
	for(i=0;i<10;i++){
		scanf("%d",&y[i]);
	}
	for(i=0;i<10;i++){
		for(j=0;j<=10;j++){
			if(y[j]<=y[i]){
				temp=y[i];
				y[i]=y[j];
				y[j]=temp;
			}
		}
	}
	for(i=0;i<3;i++){
		printf("%d\n",y[i]);
	}
	return 0;
}

C++: /*http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=0002&lang=jp*/

#include <iostream>
#include <cmath>

using namespace std;

int main()
{
    while(!cin.eof()){
        int a,b;
        cin>>a>>b;
        cout<<(int)(log10(a+b)+1)<<endl;
    }
    return 0;
}

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;
 }
}

C++: #include <iostream>
#include<vector>
#include<stdlib.h>
#include<algorithm>
#include<string>
using namespace std;



int main(void){

	int a, b,sum=0,count;

	for (;cin;){//??°????????????????????°?????????
		count = 0;
		cin >> a >> b;
		sum = a + b;
		if (sum == 0){ cout << 0 << endl; }
		else if (sum != 0){

			while (sum > 9){

				sum /= 10;
				count++;

			}
			//?????°???count?????°
			cout << count + 1 << endl;
		}
	}


	return 0;
}

C++: #include <vector>
#include <map>
#include <set>
#include <stack>
#include <queue>
#include <deque>
#include <algorithm>
#include <utility>
#include <functional>
#include <sstream>
#include <iostream>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <cctype>
#include <string>
#include <cstring>
#include <ctime>
#include <climits>
using namespace std;
inline int toInt(string s) { int v; istringstream sin(s); sin >> v; return v;}
template<class T> inline string toString(T x) { ostringstream sout; sout << x; return sout.str();}
typedef vector<int> vi;
typedef vector<vi>  vvi;
typedef vector<string> vs;
typedef pair<int, int> pii;
typedef long long ll;
#define ALL(a) (a).begin(),(a).end()
#define RALL(a) (a).rbegin(),(a).rend()
#define EACH(t,i,c) for(t::iretator i=(c).begin(); i!=(c).end(); ++i)
#define EXIST(s,e) ((s).find(e)!=(s).end())
#define FOR(i,a,b) for(int i=(a);i<=(b);++i)
#define REP(i,n) FOR(i,0,n-1)
const double EPS = 1e-10;
const double PI = acos(-1.0);

int main() {
	int a, b;

	while(cin >> a >> b) {
		cout << toString(a+b).size() << endl;
	}

	return 0;
}