solutions: 577A

This commit is contained in:
Muhammad Nauman Raza 2025-02-14 22:19:55 +00:00
parent 901163d6b5
commit 8151140245
Signed by: devraza
GPG key ID: 91EAD6081011574B

View file

@ -0,0 +1,21 @@
use std::io;
fn main() {
let mut s = String::new();
io::stdin().read_line(&mut s).unwrap();
let a: Vec<f64> = s.split_whitespace().map(|d| d.parse::<f64>().unwrap()).collect();
let n = a[0];
let x = a[1];
let mut count = 0;
for i in 1..=(n.trunc() as u64) {
let pos = x / (i as f64);
if pos.fract() == 0. && pos <= n {
count += 1
}
}
println!("{}", count);
}