Last active
September 22, 2016 14:48
-
-
Save devetude/42f0fa57db525fbf0632750d31fff16b to your computer and use it in GitHub Desktop.
순차탐색 알고리즘 1 (Sequential Search 1)
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
import java.util.Scanner; | |
/** | |
* 순차탐색 알고리즘 1 (Sequential Search 1) | |
* | |
* @author devetue | |
*/ | |
public class Main { | |
public static void main(String args[]) { | |
Scanner sc = new Scanner(System.in); | |
int N = sc.nextInt(); | |
int max = -999999999; | |
for (int i = 0; i < N; i++) { | |
int n = sc.nextInt(); | |
if (max < n) { | |
max = n; | |
} | |
} | |
System.out.println(max); | |
sc.close(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment