solutions: 63

This commit is contained in:
Muhammad Nauman Raza 2024-12-07 22:29:24 +00:00
parent 0e85c328ba
commit 07f18be475
Signed by: devraza
GPG key ID: 91EAD6081011574B

View file

@ -0,0 +1,15 @@
use num_bigint::BigUint;
fn main() {
let mut count = 0;
for i in 1..=9 {
for j in 1..=100 {
let length = BigUint::from(i as u64).pow(j).to_string().len();
if length == j.try_into().unwrap() {
count += 1;
}
}
}
println!("{}", count);
}