use proconio::input; fn f(x: i32) -> i32{ x*x*x-x*x+x+1 } fn main(){ input!{ a: usize, b: usize, } let mut ans: i32 = 0; for n in a..=b{ let mut ok: bool = true; for m in 2..n{ if n%m == 0{ ok = false; } } if ok{ ans += f(n as i32); } } println!("{}", ans); }