Created
September 8, 2016 07:07
-
-
Save conquerex/52eccd7396459225ff510a73f1f69e9f to your computer and use it in GitHub Desktop.
This file contains 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
public class Euler3 { | |
public static void main(String[] args) { | |
euler3(); | |
} | |
public static void euler3(){ | |
//double largestFF = 7.16151937E8; | |
double largestFF = 0; | |
//double num = 600851475143.0; | |
double num = 6857.0; | |
for(double i = 3 ; i < num/2 ; i=i+2 ){ | |
if(num % i == 0){ | |
largestFF=i; | |
System.out.println("결과는 = "+largestFF); | |
num = num/largestFF; | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment