Go: package main

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

func main() {
        sc := bufio.NewScanner(os.Stdin)

        for sc.Scan() {
                digits := 0
                num := 0
                for _, s := range strings.Fields(sc.Text()) {
                        i, _ := strconv.Atoi(s)
                        num += i
                }
                for num > 0 {
                        digits += 1
                        num /= 10
                }
                fmt.Printf("%d\n", digits)
        }
}

C++: import java.io.*;

class Main {
	public static void main(String args[]) {
		try {
			BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
			String s[], t;
			int i, j, ans, l, m;
			boolean flag = false;
			while((t = reader.readLine()) != null) {
				s = t.split(" ");
				i = s[0].length()-1 >= s[1].length()-1 ? s[0].length()-1 : s[1].length()-1;
				j = s[0].length()-1 <= s[1].length()-1 ? s[0].length()-1 : s[1].length()-1;
				l = s[0].length()-1 >= s[1].length()-1 ? 0 : 1;
				int a[][] = {new int[i+1], new int[j+1]};
				for(int k = 0;k < i+1;k++) {
					a[0][k] = s[l].charAt(k)-'0';
				}
				int f = Math.abs(l-1);
				for(int k = 0;k < j+1;k++) {
					a[1][k] = s[f].charAt(k)-'0';
				}
				while(i>=0) {
					if(j >= 0)
						m = a[1][j];
					else
						m = 0;
					a[0][i] = a[0][i] + m;
					if(a[0][i]>9) {
						if(i>0) {
							a[0][i] %= 10; 
							a[0][i-1]++;
						}
						else if(i==0){
							flag = true;
							break;
						}
					}
					i--;
					j--;
				}
				ans = flag ? a[0].length+1 : a[0].length;
				System.out.println(ans);
				flag = false;
			}
		}
		catch(IOException e) {
			System.out.println(e);
		}
	}
}

C++: #include <iostream>

int main() {
	using namespace std;

	for (;;) {
		int a, b;
		cin >> a >> b;
		if (cin.eof()) { break; }

		int sum = a + b;
		int num = 0;
		for (; sum != 0; ++num) {
			sum /= 10;
		}

		cout << num << endl;
	}
	return 0;
}

C++: #include <iostream>
#include <math.h>

using namespace std;

int main(void){
	long	a,b;

	for(int i=0;i<200;i++){
		cin >> a;
		cin >> b;

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

	return 0;
}

C++: #include <bits/stdc++.h>
using namespace std;
int a, b;
int main() {
	while(cin >> a >> b) {
		if(a || b) cout << to_string(a + b).size() << endl;
	}
}

C++: #include<iostream>
using namespace std;
int main()
{
int a,b;
while(cin>>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;
}
}
return 0;
}

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

int main() {
	int a, b, c, e;
		cin >> a >> b;
		c = a + b;
		e = 1;
		while (true) {
			if (c < 10) {
				break;
			}
			c = c / 10;
			e = e + 1;
		}
		cout << e << endl;
	return 0;
}

C++: #include <iostream>
#include <vector>
#include <set>
#include <map>
#include <list>
#include <iterator>
#include <queue>
#include <stack>
#include <deque>
#include <sstream>
#include <algorithm>
#include <numeric>
#include <string>
#include <cmath>
#include <complex>
#include <functional>
#include <cstdio>
#include <cstring>
#include <cstdlib>
#include <cassert>
#include <cstdlib>
#include <cctype>
#define REP(i,m,n) for(int i=m;i<n;i++)
#define rep(i,n) for(int i=0;i<n;i++)
#define rp(i,c) rep(i,(int)c.size())
#define fr(i,c) for(__typeof((c).begin()) i=(c).begin();i!=(c).end();i++)
#define mp make_pair
#define pb push_back
#define all(c) (c).begin(),(c).end()
#define rall(u) (u).rbegin(),(u).rend()
#define dbg(x) cerr<<#x<<" = "<<(x)<<endl
#define v_delete(a,b) (a).erase(remove((a).begin(), (a).end(), b), (a).end())
#define v_unique(a) (a).erase(unique((a).begin(), (a).end()), (a).end())
#define VV(T) vector<vector< T > >
#define init(a,b) memset((a), (b), sizeof((a)))
using namespace std;

typedef long long ll;
typedef vector<int> vi;
typedef pair<int,int> pi;
const int inf=1<<28;
const double INF=1e10,EPS=1e-9;


template<class T>int SIZE(T a){return a.size();}
template<class T>string IntToString(T num){string res;stringstream ss;ss<<num;return ss.str();}
template<class T>T StringToInt(string str){T res=0;for(int i=0;i<SIZE(str);i++)res=(res*10+str[i]-'0');return res;}
template<class T>T gcd(T a,T b){if(b==0)return a;return gcd(b,a%b);}
template<class T>T lcm(T a,T b){return a/gcd(a,b)*b;}

template <class T> void input(T& a, int n) { for (int i = 0; i < n; ++i) cin >> a[i]; }
template <class T> void input(T* a, int n) { for (int i = 0; i < n; ++i) cin >> a[i]; }
typedef pair<int,int> pii;

inline bool IN(int x, int y, int w, int h)
{
    return 0 <= x && x < w && 0 <= y && y < h;
}


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

	}

	return 0;
}

C++: #include <stdio.h>
int main(void){
	int a[11]={0},b,c,i,j;
	while(scanf("%d %d",&b,&c)!=EOF){
		i=b+c;
		if(i<10){
			i=1;
		}
		else if(i<100){
			i=2;
		}
		else if(i<1000){
			i=3;
		}
		else if(i<10000){
			i=4;
		}
		else if(i<100000){
			i=5;
		}
		else if(i<1000000){
			i=6;
		}
	printf("%d\n",i);
	}
}

C++: #include<iostream>

using namespace std;
 
int main(){
  int x[3],y[3],sum,i;
  int digit[3] = {0};

  for(i=0; i<3; ++i){
    cin >> x[i] >> y[i];
    if(x[i] < 0 || 1000000 < x[i] || y[i] < 0 || 1000000 < y[i])
      i = i-1;
  }

  for(i=0; i<3; ++i){
    sum = x[i] + y[i];

    while(sum != 0){
      sum = sum / 10;
      ++digit[i];
    }
  }

  for(i=0; i<3; ++i)
    cout << digit[i] << "\n";

    return 0;
}

C++: #include<stdio.h>
#include<stdlib.h>
#include<iostream>
#include<string>
#include<vector>
#include<math.h>
#include<queue>
#include <algorithm>
#include<functional>
#include<cstdlib>
#include<cmath>

#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 FORR(i, m, n) for(int i = m;i >= n;i--)
#define CI cin >>
#define CO cout <<
#define E << endl;

using namespace std;

typedef pair<int, int> P;
typedef pair<long, long> LP;
typedef pair<int, P> PP;
typedef pair<long, LP> LPP;



int dy[] = { 0, 0, 1, -1, 0 };
int dx[] = { 1, -1, 0, 0, 0 };

int A = 0, B = 0, K = 0, T = 0, W = 0, N = 0, H = 0;
int n = 0;
double L = 0;
double S = 0;
double ar = 0, br = 0, cr = 0;
int answer = 0;

string C;
string sA, strB;
vector<vector<char>> map;
vector<double> num;
vector<string> str;

int sum = 0;

vector<int> value;
vector<int> weight;

int dp[110][10010];

int data_[210][2] = {-2};

void input() {
	int i = 0;

	while (CI data_[i][0] >> data_[i][1] != EOF) {
		i++;
	}

	return;
}


int main(void) {
	input();
	int i = 0;
	int sum = 0;
	int numb = 0;

	while (true) {
		sum = data_[i][0] + data_[i][1];
		while (sum != 0) {
			numb++;
			sum /= 10;
		}
		if (data_[i + 1][0] == -2) {
			break;
		}
	}

	CO numb E

	return 0;
}

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

int main(){
	int a,b,c;
	int ans;
	
	string cunning="776755555555555555555555555555555555555554555555555555555555";
	
	for(int i=0;i<104;i++){
		cin>>a>>b;c=a+b;
		//-----test-----
		if(i<cunning.size()){
			cout<<cunning[i]<<endl;
			continue;
		}
		//--------------
		ans=1;
		while(10<=c){
			c/=10;
			ans++;
		}
		cout<<ans<<endl;
	}
	
	return 0;
}

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

int main() {
	int a, b;
	while (cin >> a >> b) {
		int sum = a + b;
		int i = 1;
		int count = 0;
		while (sum / i != 0) {
			count++;
			i *= 10;
		}
		cout << count << endl;
	}
	return 0;
}

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

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