Language: C++

#![allow(unused_imports, unused_variables, dead_code)]
use std::io::*;
use std::fmt::*;
use std::str::*;
use std::cmp::*;
use std::collections::*;
 
pub trait InputValue {
    fn parse(s: &str) -> Self;
}
 
pub fn read<T: InputValue>() -> T {
    let mut buf = String::new();
    let _ = stdin().read_line(&mut buf);
    T::parse(&buf.trim())
}
 
pub fn readnc<T: InputValue>() -> Vec<T> {
    let mut vec = vec![];
    let line: String = read();
    for token in line.split_whitespace() {
        vec.push(T::parse(token));
    }
    vec
}
 
pub fn readn<T: InputValue>(n: usize) -> Vec<T> {
    let mut vec = vec![];
    for _ in 0..n {
        vec.push(read());
    }
    vec
}
 
macro_rules! parse_single_value {
    ($($t:ty),*) => {
        $(
            impl InputValue for $t {
                fn parse(s: &str) -> $t { s.parse().unwrap() }
            }
        )*
    }
}
parse_single_value!(i32, i64, f32, f64, usize, String);
 
macro_rules! parse_tuple {
    ($($t:ident),*) => {
        impl<$($t),*> InputValue for ($($t),*) where $($t: InputValue),* {
            fn parse(s: &str) -> ($($t),*) {
                let mut tokens = s.split_whitespace();
                let t = ($($t::parse(tokens.next().unwrap())),*);
                t
            }
        }
    }
}
parse_tuple!(A, B);
parse_tuple!(A, B, C);
 
// ===
 
fn main() {
    let (n, a, b): (i32, i32, i32) = read();
    
    let mut ans : i32 = 0;
    if a == b {
        ans = 1;
    } else if a < b && n != 1 {
        ans = (b - a) * (n - 2) + 1;
    }

    println!("{}", ans);
}

Compiler output:
a.cc:1:2: error: invalid preprocessing directive #!
    1 | #![allow(unused_imports, unused_variables, dead_code)]
      |  ^
a.cc:29:14: error: too many decimal points in number
   29 |     for _ in 0..n {
      |              ^~~~
a.cc:2:1: error: 'use' does not name a type
    2 | use std::io::*;
      | ^~~
a.cc:3:1: error: 'use' does not name a type
    3 | use std::fmt::*;
      | ^~~
a.cc:4:1: error: 'use' does not name a type
    4 | use std::str::*;
      | ^~~
a.cc:5:1: error: 'use' does not name a type
    5 | use std::cmp::*;
      | ^~~
a.cc:6:1: error: 'use' does not name a type
    6 | use std::collections::*;
      | ^~~
a.cc:8:1: error: 'pub' does not name a type
    8 | pub trait InputValue {
      | ^~~
a.cc:12:1: error: 'pub' does not name a type
   12 | pub fn read<T: InputValue>() -> T {
      | ^~~
a.cc:18:1: error: 'pub' does not name a type
   18 | pub fn readnc<T: InputValue>() -> Vec<T> {
      | ^~~
a.cc:27:1: error: 'pub' does not name a type
   27 | pub fn readn<T: InputValue>(n: usize) -> Vec<T> {
      | ^~~
a.cc:35:1: error: 'macro_rules' does not name a type
   35 | macro_rules! parse_single_value {
      | ^~~~~~~~~~~
a.cc:44:1: error: 'parse_single_value' does not name a type
   44 | parse_single_value!(i32, i64, f32, f64, usize, String);
      | ^~~~~~~~~~~~~~~~~~
a.cc:46:1: error: 'macro_rules' does not name a type
   46 | macro_rules! parse_tuple {
      | ^~~~~~~~~~~
a.cc:57:1: error: 'parse_tuple' does not name a type
   57 | parse_tuple!(A, B);
      | ^~~~~~~~~~~
a.cc:58:1: error: 'parse_tuple' does not name a type
   58 | parse_tuple!(A, B, C);
      | ^~~~~~~~~~~
a.cc:62:1: error: 'fn' does not name a type
   62 | fn main() {
      | ^~