major bug fix
This commit is contained in:
parent
23e9c95dbd
commit
d64116d255
4 changed files with 3002 additions and 1 deletions
1000
rust/fourthfree/log
Normal file
1000
rust/fourthfree/log
Normal file
File diff suppressed because it is too large
Load diff
1000
rust/fourthfree/log2
Normal file
1000
rust/fourthfree/log2
Normal file
File diff suppressed because it is too large
Load diff
1000
rust/fourthfree/log3
Normal file
1000
rust/fourthfree/log3
Normal file
File diff suppressed because it is too large
Load diff
|
|
@ -6,8 +6,9 @@ const BASE: u64 = 10;
|
|||
fn is_fourth_free(x: &u64) -> bool {
|
||||
let mut i = 2;
|
||||
let mut fourth = i * i * i * i;
|
||||
while fourth < *x {
|
||||
while fourth <= *x {
|
||||
if x % fourth == 0 {
|
||||
println!("{}", x);
|
||||
return false;
|
||||
}
|
||||
i += 1;
|
||||
|
|
|
|||
Loading…
Reference in a new issue