use std::io::{self, *}; fn main() { let stdin = io::stdin(); for line in stdin.lock().lines() { println!("{}", line.unwrap().chars().fold(0, |acc, x| { 16 * acc + match x { '0' => 0, '1' => 1, '2' => 2, ...