fn main() { let n: usize = read(); let (mut pvec, _) = prime_sieve(n); pvec.pop(); for i in 0..pvec.len() { if pvec[i].pow(2) > n { break; } let mut pow: usize = pvec[i]; loop { pow *= pvec[i]; if pow * pvec[i] > n { break; } } pvec[i] = pow; } let mut ans: usize = 1; for i in 0..pvec.len() { ans = (ans * pvec[i]) % 998244353; } println!("{}", ans); } fn read() -> T { let mut s = String::new(); std::io::stdin().read_line(&mut s).ok(); s.trim().parse().ok().unwrap() } // *****prime.rs (https://github.com/kgtkr/procon-lib-rs/blob/master/src/prime.rs) // Copyright (c) 2018 tkr // MIT license // https://github.com/kgtkr/procon-lib-rs/blob/master/LICENSE //max以下の素数列挙 pub fn prime_sieve(n: usize) -> (Vec, Vec) { let mut prime = Vec::new(); let mut is_prime = Vec::with_capacity(n + 1); is_prime.resize(n + 1, true); is_prime[0] = false; is_prime[1] = false; for i in 2..n + 1 { if is_prime[i] { prime.push(i); let mut j = 2 * i; while j <= n { is_prime[j] = false; j += i; } } } (prime, is_prime) } // *****end of prime.rs*****