Language: C++


fn main() {
        let n = readln();
        let mut c:f32 = 100000.0;

        for _i in 0..n {
            c=c+c*0.05;
            if c%1000.0!=0.0{
                c=(((c/1000.0) as i32) as f32)*1000.0+1000.0;
            }
        }
        println!("{:.0}",c);
}
     
    // --- template ---
    #[allow(unused_imports)]
    use std::cmp::{max, min};
    #[allow(unused_imports)]
    use std::collections::{HashMap, HashSet, VecDeque};
     
    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:6:19: error: too many decimal points in number
    6 |         for _i in 0..n {
      |                   ^~~~
a.cc:16:6: error: invalid preprocessing directive #[
   16 |     #[allow(unused_imports)]
      |      ^
a.cc:18:6: error: invalid preprocessing directive #[
   18 |     #[allow(unused_imports)]
      |      ^
a.cc:31:18: error: too many decimal points in number
   31 |         for _ in 0..n {
      |                  ^~~~
a.cc:2:1: error: 'fn' does not name a type
    2 | fn main() {
      | ^~
a.cc:17:5: error: 'use' does not name a type
   17 |     use std::cmp::{max, min};
      |     ^~~
a.cc:19:5: error: 'use' does not name a type
   19 |     use std::collections::{HashMap, HashSet, VecDeque};
      |     ^~~
a.cc:21:5: error: 'pub' does not name a type
   21 |     pub trait FromLn {
      |     ^~~
a.cc:24:5: error: 'pub' does not name a type
   24 |     pub fn readln<T: FromLn>() -> T {
      |     ^~~
a.cc:29:5: error: 'pub' does not name a type
   29 |     pub fn readlns<T: FromLn>(n: usize) -> Vec<T> {
      |     ^~~
a.cc:36:5: error: 'macro_rules' does not name a type
   36 |     macro_rules! fromln_primitives {
      |     ^~~~~~~~~~~
a.cc:45:5: error: 'fromln_primitives' does not name a type
   45 |     fromln_primitives!(
      |     ^~~~~~~~~~~~~~~~~
a.cc:61:5: error: 'impl' does not name a type
   61 |     impl<T> FromLn for Vec<T>
      |     ^~~~
a.cc:69:5: error: 'impl' does not name a type
   69 |     impl FromLn for Vec<char> {
      |     ^~~~
a.cc:74:5: 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);
      | ^~~~~~~~~~~~