Created
January 21, 2020 07:06
-
-
Save dalcon10028/c4daf267a42ef1c444708c5777e430cc to your computer and use it in GitHub Desktop.
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
| import java.util.*; | |
| public class Main { | |
| public static void main(String args[]) { | |
| Scanner sc = new Scanner(System.in); | |
| int N = sc.nextInt(); | |
| sc.close(); | |
| int i=2; | |
| while (N!=1) { | |
| if(N%i==0){ | |
| System.out.println(i); | |
| N/=i; | |
| continue; | |
| } | |
| i++; | |
| } | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment