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++: #include <iostream>
//#include <iomanip>
//#include <vector>
//#include <string>
#include <algorithm>
#include <functional>

using namespace std;

int main(){

	int a, b, c, ans ;


	while (1){
		ans = 1;

		if(!(cin >> a)) break;
		cin >> b;

		c = a + b;

		while (c /= 10){
			ans++;
		}
		cout << ans << endl;
	}


	return 0;
}

C++: #define _USE_MATH_DEFINES
#include <iostream>
#include <vector>
#include <math.h>
#include <string>
#include <string.h>
#include <stack>
#include <algorithm>
#include <stdio.h>
#include <functional>
using namespace std;

//??°?????????????????°

void function()
{
    //??¢??°
}
 
int main(){
	int a, b;
	while(cin >> a >> b){
		int sum = a + b;
		int cnt = 1;
		while(true){
			sum /= 10;
			if(sum == 0){
				break;
			}
			cnt++;
		}
		cout << cnt << endl;
	}
    return 0;
}

C++: #include <iostream>

using namespace std;

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

C++: #include<cstdio>
#include<iostream>
#include<cstring>
using namespace std;
int main()
{
	int a,b,c,k,i,s;
	while(cin>>a>>b)
	{
		k=a+b;
		s=0;
		while(k!=0)
		{
			k=k/10;
			s++;
		}
		cout<<s;
	}
	return 0;
}

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

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

int main()
{
  long n1, n2;
  int ans = 0;
  cin >> n1 >> n2;
  long sum = n1 + n2;
  while(sum > 0){
    sum /= 10;
    ans++;
  }
  ans = (n1 == 0 & n2 == 0) ? 1 : ans;
  cout << ans << endl;
}

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

int main() {
	int a, b;
	while (cin >> a >> b) {
		double tmp = a + b; int keta = 0;
		while (true) {
			if (tmp < 10)break;
			tmp = tmp / 10;
			keta++;
		}
		cout << keta << endl;
	}
}

C++: #include <iostream>
#include <cmath>
#include <limits>

int main(void)
{
	int32_t first  = 0;
	int32_t second = 0;

	while( std::cin >> first )
	{
		std::cin >> second;

		std::cout << static_cast<int32_t>(std::log10(first + second))+1 << std::endl;
	}

	return 0;
}

C++: //
//  main.cpp
//  b
//
//  Created by h3037178 on 2017/07/31.
//  Copyright ?? 2017??´ ?????£?????????. All rights reserved.
//

#include <iostream>
#include <algorithm>
using namespace std;
int main(){
    int i,o,b=0,f;
    for(int p=0;p<200;p++){
        cin>>i>>o;
        b=0;
        f=i+o;
        if(f<=0||f>2000000  ){
            break;
        }
        for(int j=1;j<=1000000;j=j*10){
            if(i+o>=j){
                b++;
            }else{
                break;
            }
        }
        cout<<b<<endl;
        }
}

C++: #include<stdio.h> 
int main() 
{ 
      int a,b,x,w; 
      while(scanf("%d %d",&a,&b)!=EOF) 
      { 
         x=a+b;
		 w=0; 
         while(x) 
           { 
		      w++; 
              x/=10; 
           } 
         printf("%d\n",w); 
      } 
      return 0; 
}

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

int main(){

  vector<long int> array1(200,0);
  vector<long int> array2(100,0);
  vector<int>      array3(100,1);

  for(int i = 0;i<6;i++){
    cin >> array1[i];
  }

  for(int i = 0; i < 3;i++){
    array2[i] = array1[2*i] + array1[2*i+1];
  }

  for(int i = 0; i < 3;i++){
    while(array2[i] / 10 != 0){

      array3[i]++;
      array2[i] /= 10;

    }
  }

  for(int i = 0; i < 3;i++){
    cout  << array3[i] << endl;
  }


    return 0;
}

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

int main(){
	int a,b,c;
	int ans;
	
	string cunning="776755555555555555555555555555555555555554";
	
	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>
int main()
{
	int result[200];
	int num;
	for(int i = 0;; i++)
	{
		int a, b;
		std::cin >> a >> b;
		if(std::cin.eof())
		{
			num = i;
			break;
		}
		for(int j = 10, k = 1;; j *= 10, k++)
		{
			if((a + b) / j == 0)
			{
				result[i] = k;
				break;
			}
		}
	}
	for(int i = 0; i < num; i++)
	{
		std::cout << result[i] << std::endl;
	}
	return 0;
}

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

#define pout(n)  printf ("%d\n", n)

#define rep(i,a,n) for (int i = a;i < n;i++)
#define per(i,n,a) for (int i = n-1;i >= a;i--)

const int d4x[4] = {1, 0, -1, 0};
const int d4y[4] = {0, 1, 0, -1};
const int d8x[8] = { 1,1,0,-1,-1,-1,0,1 };
const int d8y[8] = { 0,1,1,1,0,-1,-1,-1 };
 
typedef long long ll;
using namespace std;
 
int main() {
  int a,b;
  while(cin >> a >> b){
    a += b;
    int count = 1;
    
    while(a != 0){
       a /= 10;
      count++;
    }
    
    pout(count);
  }
  return 0;
}

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

void listen_nums(int &a,int &b);

int calc_digit(const int num);

int main()
{
	int a,b;
	
	for(;1;)
	{
		listen_nums(a,b);
		int sum=a+b;
		std::cout<<calc_digit(sum)<<std::endl;
	}
	
	return 0;
}

void listen_nums(int &a,int &b)
{
	using namespace std;
	cin>>a>>b;
	
	if(cin.eof())
	{
		exit(0);
	}
}

int calc_digit(const int num)
{
	return (int)log10((double)num)+1;
}

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

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