Problem:
Score : 100 points

Problem Statement

An uppercase or lowercase English letter \alpha will be given as input.
If \alpha is uppercase, print A; if it is lowercase, print a.

Constraints

\alpha is an uppercase (A - Z) or lowercase (a - z) English letter.

Input

Input is given from Standard Input in the following format:

α

Output

If \alpha is uppercase, print A; if it is lowercase, print a.

Sample Input 1

B

Sample Output 1

A

B is uppercase, so we should print A.

Sample Input 2

a

Sample Output 2

a

a is lowercase, so we should print a.

Solution in Rust (1.42.0) (judge verdict: Runtime Error)

macro_rules! input_inner {
    ($iter:expr) => {};
    ($iter:expr, ) => {};

    ($iter:expr, $var:ident : $t:tt $($r:tt)*) => {
        let $var = read_value!($iter, $t);
        input_inner!{$iter $($r)*}
    };
}

macro_rules! read_value {
    ($iter:expr, ( $($t:tt),* )) => {
        ( $(read_value!($iter, $t)),* )
    };

    ($iter:expr, [ $t:tt ; $len:expr ]) => {
        (0..$len).map(|_| read_value!($iter, $t)).collect::<Vec<_>>()
    };

    ($iter:expr, chars) => {
        read_value!($iter, String).chars().collect::<Vec<char>>()
    };

    ($iter:expr, usize1) => {
        read_value!($iter, usize) - 1
    };

    ($iter:expr, $t:ty) => {
        $iter.next().unwrap().parse::<$t>().expect("Parse error")
    };
}
macro_rules! input {
    (source = $s:expr, $($r:tt)*) => {
        let mut iter = $s.split_whitespace();
        input_inner!{iter, $($r)*}
    };
    ($($r:tt)*) => {
        let s = {
            use std::io::Read;
            let mut s = String::new();
            std::io::stdin().read_to_string(&mut s).unwrap();
            s
        };
        let mut iter = s.split_whitespace();
        input_inner!{iter, $($r)*}
    };
}

// fn minus(a: Vec<isize>, b:Vec<isize>) -> Vec<isize> {
//     let mut z = vec![0,0,0];
//     for (i, (aval, bval)) in a.iter().zip(&b).enumerate() {
//         z[i] = aval - bval;
//     }
//     z
// }

use std::collections::HashMap;
fn main() {
    // let c: char = 'a';
    // let num: i32 = c as i32 -96;
    // println!("{}", num);  // 5
    input! {
      n: usize,
      a: [usize; n],
      q: usize,
      b: [(usize, usize); q],
    }
    let mut map = HashMap::new();
    let mut sum: usize = a.iter().sum();

    for i in a {
        let count = map.entry(i).or_insert(0);
        *count += 1;
    }
    for (i, j) in b {
        let value:usize = *map.get(&i).unwrap();
        sum -= value * (i - j);
        let count = map.entry(j).or_insert(value);
        *count += value;
        map.remove(&i);
        println!("{}", sum);
    }
}