13 lines
355 B
Rust
13 lines
355 B
Rust
use std::io;
|
|
|
|
fn main(){
|
|
let fibonacci = [0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377,
|
|
610, 987, 1597, 2584, 4181, 6765];
|
|
|
|
let mut n = String::new();
|
|
io::stdin().read_line(&mut n)
|
|
.expect("Failed to read line");
|
|
let n = n.trim().parse::<usize>().unwrap();
|
|
|
|
println!("{}", fibonacci[n]);
|
|
} |