use proconio::marker::Chars; fn main() { proconio::input! { n: u64, } let mut table = [false; 10001]; table .iter_mut() .skip(2) .zip(PRIME.iter()) .for_each(|(a, b)| *a = *b); if table[n as usize] { println!("Win"); } else { println!("Lose"); } } fn proc(n: u64) -> u64 { (n / 3 + n / 5) * 2 } const PRIME: [bool; 10001] = create_prime(); const fn create_prime() -> [bool; N] { let mut table = [true; N]; table[0] = false; table[1] = false; let mut i = 2; while i < N { if table[i] { let mut j = i * 2; while j < N { table[j] = false; j += i; } } i += 1; } table } #[cfg(test)] mod test { use super::*; #[test] fn test() {} }