Skip to content

Instantly share code, notes, and snippets.

@conquerex
Created September 8, 2016 07:07
Show Gist options
  • Save conquerex/52eccd7396459225ff510a73f1f69e9f to your computer and use it in GitHub Desktop.
Save conquerex/52eccd7396459225ff510a73f1f69e9f to your computer and use it in GitHub Desktop.
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