Last active
September 4, 2018 10:39
-
-
Save Doaxan/f68a15c8ba3f51a98d399fec90f5f4e0 to your computer and use it in GitHub Desktop.
rust_slow_12sec
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| fn main() { | |
| let mut count = 0; | |
| for k in 2_u32..3 { | |
| for x in 1_u32..101 { | |
| for a in 1_u32..101 { | |
| for b in 1_u32..101 { | |
| for c in 1_u32..101 { | |
| for d in 1_u32..101 { | |
| if u32::pow(x, k) == u32::pow(a, k) + u32::pow(b, k) + u32::pow(c, k) + u32::pow(d, k) { | |
| count += 1; | |
| } | |
| } | |
| } | |
| } | |
| } | |
| } | |
| } | |
| println!("{}", count); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment