Skip to content

Instantly share code, notes, and snippets.

@tokugh
Created July 6, 2021 21:55
Show Gist options
  • Save tokugh/78d46aa289779bf75166bbaafa107ae4 to your computer and use it in GitHub Desktop.
Save tokugh/78d46aa289779bf75166bbaafa107ae4 to your computer and use it in GitHub Desktop.
use num_integer::{Integer, Roots};
fn main() {
proconio::input!{abc: i64};
let mut cnt = 0;
for a in 1..=abc.cbrt() {
if !abc.is_multiple_of(&a) { continue; }
let bc = abc / a;
for b in a..=bc.sqrt() {
if !bc.is_multiple_of(&b) { continue; }
let c = bc / b;
cnt += 1;
}
}
println!("{}", cnt);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment