Language: C++

fn main(){
    loop{
        let mut buf = String::new();
        let _ = io::stdin().read_line(&mut buf);
        if buf == "" { break; }
        let v: Vec<_> = buf.split_whitespace().collect();
        let a: i32 = v[0].parse().unwrap();
        let b: i32 = v[1].parse().unwrap();
        println!("{}", (a + b).to_string().len());
    
    }

}
    

// --- template ---
#[allow(unused_imports)]
use std::cmp::{max, min};
#[allow(unused_imports)]
 
pub trait FromLn {
    fn fromln(s: &str) -> Self;
}
pub fn readln<T: FromLn>() -> T {
    let mut buf = String::new();
    let _ = ::std::io::stdin().read_line(&mut buf).unwrap();
    T::fromln(buf.trim())
}
pub fn readlns<T: FromLn>(n: usize) -> Vec<T> {
    let mut vs = vec![];
    for _ in 0..n {
        vs.push(readln());
    }
    vs
}
macro_rules! fromln_primitives {
    ($($t:ty),*) => { $(
        impl FromLn for $t {
            fn fromln(s: &str) -> $t {
                s.parse().unwrap()
            }
        }
    )* }
}
fromln_primitives!(
    String,
    bool,
    f32,
    f64,
    isize,
    i8,
    i16,
    i32,
    i64,
    usize,
    u8,
    u16,
    u32,
    u64
);
impl<T> FromLn for Vec<T>
where
    T: FromLn,
{
    fn fromln(s: &str) -> Vec<T> {
        s.split_whitespace().map(T::fromln).collect()
    }
}
impl FromLn for Vec<char> {
    fn fromln(s: &str) -> Vec<char> {
        s.chars().collect()
    }
}
macro_rules! fromln_tuple {
    ($($t:ident),*) => {
        impl<$($t),*> FromLn for ($($t),*) where $($t: FromLn),* {
            fn fromln(s: &str) -> ($($t),*) {
                let mut it = s.split_whitespace();
                let t = ($($t::fromln(it.next().unwrap())),*);
                assert_eq!(it.next(), None);
                t
            }
        }
    }
}
fromln_tuple!(A, B);
fromln_tuple!(A, B, C);
fromln_tuple!(A, B, C, D);
fromln_tuple!(A, B, C, D, E);
fromln_tuple!(A, B, C, D, E, F);



Compiler output:
a.cc:17:2: error: invalid preprocessing directive #[
   17 | #[allow(unused_imports)]
      |  ^
a.cc:19:2: error: invalid preprocessing directive #[
   19 | #[allow(unused_imports)]
      |  ^
a.cc:31:14: error: too many decimal points in number
   31 |     for _ in 0..n {
      |              ^~~~
a.cc:1:1: error: 'fn' does not name a type
    1 | fn main(){
      | ^~
a.cc:18:1: error: 'use' does not name a type
   18 | use std::cmp::{max, min};
      | ^~~
a.cc:21:1: error: 'pub' does not name a type
   21 | pub trait FromLn {
      | ^~~
a.cc:24:1: error: 'pub' does not name a type
   24 | pub fn readln<T: FromLn>() -> T {
      | ^~~
a.cc:29:1: error: 'pub' does not name a type
   29 | pub fn readlns<T: FromLn>(n: usize) -> Vec<T> {
      | ^~~
a.cc:36:1: error: 'macro_rules' does not name a type
   36 | macro_rules! fromln_primitives {
      | ^~~~~~~~~~~
a.cc:45:1: error: 'fromln_primitives' does not name a type
   45 | fromln_primitives!(
      | ^~~~~~~~~~~~~~~~~
a.cc:61:1: error: 'impl' does not name a type
   61 | impl<T> FromLn for Vec<T>
      | ^~~~
a.cc:69:1: error: 'impl' does not name a type
   69 | impl FromLn for Vec<char> {
      | ^~~~
a.cc:74:1: error: 'macro_rules' does not name a type
   74 | macro_rules! fromln_tuple {
      | ^~~~~~~~~~~
a.cc:86:1: error: 'fromln_tuple' does not name a type
   86 | fromln_tuple!(A, B);
      | ^~~~~~~~~~~~
a.cc:87:1: error: 'fromln_tuple' does not name a type
   87 | fromln_tuple!(A, B, C);
      | ^~~~~~~~~~~~
a.cc:88:1: error: 'fromln_tuple' does not name a type
   88 | fromln_tuple!(A, B, C, D);
      | ^~~~~~~~~~~~
a.cc:89:1: error: 'fromln_tuple' does not name a type
   89 | fromln_tuple!(A, B, C, D, E);
      | ^~~~~~~~~~~~
a.cc:90:1: error: 'fromln_tuple' does not name a type
   90 | fromln_tuple!(A, B, C, D, E, F);
      | ^~~~~~~~~~~~