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 main()
{
	int d, a, b, s;

	d = 1;
	
	
	while(d < 200){
		
		s = 0;
		cin >> a >> b;

		a += b;

		while(a>0){
			a /= 10;
			s++;
		}

		cout << s << endl;
		d++;

	}



	return 0;
}

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

int digit_num(int num){
  int ret = 1;
  int base = 10;
  int rest = num / base;
  
  while(rest != 0){
    ret++;
    rest /= base;
  }
  
  return ret;
}

int main(){
  vector<int> ans;
  int a, b;
  
  while(cin >> a && cin >> b) ans.push_back(digit_num(a + b));
  
  for(int i = 0; i < (int)ans.size(); i++) cout << ans[i] << endl;
  
  return 0;
}

C++: #include <iostream>

using namespace std;

int digits(int n) {
    int dig = 1;

    while (n / 10) {
        dig++;
        n /= 10;
    }
    return dig;
}

int main(void)
{
    int a, b;
    
    while (cin >> a >> b) 
        cout << digits(a + b) << '\n';

    return 0;
}

C++: #include <iostream>
#include <cstdio>
#define KETAMAX (15)
using namespace std;
int main(void){
    
    int a = 0;
    int b = 0;
    int keta = 0;
    char Dumy[KETAMAX] = {'\0'};
    
    scanf("%d",&a);
    scanf("%d",&b);
        
    keta = sprintf(Dumy,"%d",(a + b));
        
    printf("%d",keta);
        
    return(0);
}

C++: #include<iostream>
using namespace std;
int main()
{
int a,b;
for(int i=0;i<200;i++)
{
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>
#include<algorithm>
#include<math.h>
#include<stdio.h>
using namespace std;
int unco(int n);

int main(int argc, char *argv[]){
	int a[200],b[200];
	scanf("%d %d",&a[0],&b[0]);
	a[0]+=b[0];
		cout<<unco(a[0])<<endl;
	for(int i=0;a[i]!=NULL;){
		i++;
		scanf("%d %d",&a[i],&b[i]);
		a[i]+=b[i];
		cout<<unco(a[i])<<endl;
	}
	return 0;
}
int unco(int n){
	int i;
	return (int)(logf((float)n)/logf(10.0))+1;
}

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

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


using namespace std;

int main()
{
	
	int a,b;
	string input;
	int size[3];
	int i = 0;
	int count = 0;
	//cout << "input two numbers" << endl;
	while(a!=EOF){
	cin >> a >> b;
	b += a;
	input = to_string(b);
	size[i] = input.size();	
	i++;
	count++;
}
for(i=0;i < count;i++){
	cout << size[i] << endl;
}

}

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

int main()
{
    int a,b;
    cin>>a>>b;
    cout<<a%b<<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 = 0;
    
    while(a != 0){
       a /= 10;
      count++;
    }
    
    pout(count);
  }
  return 0;
}

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

int main(){
	int a,b,c;
	int ans;
	bool flg;
	int cnt=-1;
	
	while(cin>>a>>b){
		cnt++;flg=false;
		//-----test-----
		switch(cnt){
		case 0:
			if(a!=1000000) flg=true; 
			break;
		}
		
		if(flg) break;
		
		//--------------
		c=a+b;
		ans=1;
		while(10<=c){
			c/=10;
			ans++;
		}
		cout<<ans<<endl;
	}
	
	return 0;
}

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

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

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

		cin >> a >> b;
		sum = a + b;
		if (sum < 10)cout << "1" << endl;
		if (sum < 100 && sum >= 10)cout << "2" << endl;
		if (sum < 1000 && sum >= 100)cout << "3" << endl;
		if (sum < 10000 && sum >= 1000)cout << "4" << endl;
		if (sum < 100000 && sum >= 10000)cout << "5" << endl;
		if (sum < 1000000 && sum >= 100000)cout << "6" << endl;
		if (sum < 10000000 && sum >= 1000000)cout << "7" << endl;

		return 0;
}

C++: #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> P;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define MOD (int) (1e9+7)
#define INF (int) 2e9

int main(){
    int a, b;
    while(cin >> a >> b){
        int s= a+b, cnt = 0;
        while(s>0){
            s /= 10;
            cnt++;
        }
        cout << cnt << endl;
        // printf("%d\n", N);
    
    }
    return 0;
}

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

int main(){
  int a,b;
    while(cin >> a >> b){
      int x=a+b;
    int count=0,i;
    for(i=1;i<=1000000;i*=10){
      if(x/i>=1){
	count++;
      }
      if(x/i<0){
	break;
      }
    }
    cout << count << endl;

  }





 return 0;
}

C++: #include<iostream>
using namespace std;
int main(){
	int a,b;
	while(cin >> a >> b){
		int sum = a + b;
		//cout << a << " " << b << " " << sum << endl;
		int n = 1;
		int index = 0;
		while(1){
			if(n > sum) break;
			n *= 10;
			index++;
		}
		//cout << n << " " << index << endl;
		cout << index << endl;
	}
	return 0;
}

C++: #include <stdio.h>
#include <string.h>
#include <stdlib.h>

int main()
{
    long long int num,a,b,sum,i,j,k,len;
    char str[1000],ch[1000];
    while(scanf("%lld %lld",&a,&b)==2)
    {
        sum=a+b;
        itoa(sum,str,10);
        len=strlen(str);
        printf("%lld\n",len);
    }
return 0;
}

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

int main(void)
{
#if 0
    int i;
    int x, y;

    for (;;) {
        if (scanf("%d %d", &x, &y) == EOF) {
            break;
        }
        x += y;
        for (i = 1; ; i++) {
            x /= 10;
            if (x == 0) {
                break;
            }
        }
        printf("%d\n", i);
    }
#else
    int i;
    int x, y;
    char st[10];

    for (;;) {
        if (scanf("%d %d", &x, &y) == EOF) {
            break;
        }
        x += y;
        sprintf(st, "%d", x);
        printf("%d\n", strlen(st));
    }
#endif
    return 0;
}

C++: 
#include <iostream>
#include <vector>
#include <algorithm>
#include <string>

using namespace std;

#define rep(i,n) for(int i = 0; i < n; i++)
#define REP(i,j,n) for(int i = j; i < n; i++)


int main(){

	int a,b;
	int sum = 0;
	cin >> a >> b;

	sum = a + b;

	int x = 1;

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

	if(x != 0){
		cout << x << endl;
	}
	else{
		cout << 0 << endl;
	}
	return 0;
}

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

int main() {
	int a[100];
	int i=0;
	int x,y;
	while(cin>>x>>y){
		a[i]=x+y;
		i++;
	}
	for(int j=0;j<i;j++){
		int count=1;
		while(a[j]>=10){
			a[j]=a[j]/10;
			count++;
		}
		cout<<count<<endl;
	}
	// your code goes here
	return 0;
}