Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class Main {
- public static void main(String[] args) throws InterruptedException {
- Scanner input = new Scanner(System.in);
- int n = Integer.parseInt(input.nextLine());
- int minNum = Integer.MAX_VALUE;
- for (int i = 0; i < n; i++) {
- int currentNumber = Integer.parseInt(input.nextLine());
- if (currentNumber <= minNum) {
- minNum = currentNumber ;
- }
- }
- System.out.println(minNum);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment