performance: iterate through only 3-digit numbers
This commit is contained in:
parent
9430b8cfd2
commit
e9eb2e6745
|
@ -1,8 +1,8 @@
|
|||
fn main() {
|
||||
let mut product: i64 = 0;
|
||||
|
||||
for i in 1..=999 {
|
||||
for j in 1..=999 {
|
||||
for i in 100..=999 {
|
||||
for j in 100..=999 {
|
||||
let product_string: String = format!("{:?}", i * j);
|
||||
let reversed_string = product_string.chars().rev().collect::<String>();
|
||||
|
||||
|
|
Loading…
Reference in a new issue