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