Created
September 4, 2018 10:39
-
-
Save Doaxan/a09b294e1b49a45c9e309b560a8f13da to your computer and use it in GitHub Desktop.
rust_fast_0.146sec
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 3_u32..4 { | |
| for x in 1_u32..41 { | |
| for a in 1_u32..41 { | |
| for b in 1_u32..41 { | |
| for c in 1_u32..41 { | |
| for d in 1_u32..41 { | |
| 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