(n: i32)
| 1 | pub fn count_triples(n: i32) -> i32 { |
| 2 | let mut counter = 0; |
| 3 | for i in 1..n+1 { |
| 4 | for j in 1..n+1 { |
| 5 | for k in 1..n+1 { |
| 6 | if i * i + j * j == k * k { |
| 7 | counter += 1; |
| 8 | } |
| 9 | } |
| 10 | } |
| 11 | } |
| 12 | counter |
| 13 | } |
| 14 | |
| 15 | fn main() { |
| 16 | println!("{:?}", count_triples(10)); |
nothing calls this directly
no outgoing calls
no test coverage detected