init
This commit is contained in:
6
problems/p110/Cargo.toml
Normal file
6
problems/p110/Cargo.toml
Normal file
@@ -0,0 +1,6 @@
|
||||
[package]
|
||||
name = "p110"
|
||||
version = "0.1.0"
|
||||
edition = "2024"
|
||||
|
||||
[dependencies]
|
||||
21
problems/p110/src/main.rs
Normal file
21
problems/p110/src/main.rs
Normal file
@@ -0,0 +1,21 @@
|
||||
// n, x, y > 0
|
||||
// 1 / n = 1 / x + 1 / y
|
||||
// = (x + y) / (x * y)
|
||||
//
|
||||
// n * (x + y) == (x * y)
|
||||
//
|
||||
// => (x, y) > n
|
||||
// => n * (x + y) > 2 * n^2, (x * y) > n^2
|
||||
// => (x * y) > 2 * n^2
|
||||
|
||||
fn get_sol_count(n: u32) -> u32 {}
|
||||
#[test]
|
||||
fn test_get_sol_count() {
|
||||
assert_eq!(get_sol_count(4), 3);
|
||||
assert_eq!(get_sol_count(1260), 113);
|
||||
}
|
||||
|
||||
fn main() {
|
||||
todo!();
|
||||
println!("Hello, world!");
|
||||
}
|
||||
Reference in New Issue
Block a user