use std::io::*; use std::str::FromStr; fn main() { exec(read()); } fn exec(i: i64) { println!("{}", fizzbuzzstring(i)); } fn fizzbuzzstring(i: i64) -> i64 { let a = i / 15; let b = i / 5; let c = i / 3; a * 4 + (b + c - a * 2) * 2 } fn read() -> T { let stdin = stdin(); let stdin = stdin.lock(); let token: String = stdin .bytes() .map(|c| c.expect("failed to read char") as char) .skip_while(|c| c.is_whitespace()) .take_while(|c| !c.is_whitespace()) .collect(); token.parse().ok().expect("failed to parse token") }