Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package com.company;
- import com.sun.org.apache.xpath.internal.SourceTree;
- import java.time.chrono.MinguoEra;
- import java.util.Scanner;
- public class Main {
- public static void main(String[] args) {
- Scanner scanner = new Scanner(System.in);
- int n = Integer.parseInt(scanner.nextLine());
- int min= Integer.MAX_VALUE;
- for (int i = 0; i <n ; i++) {
- int a = Integer.parseInt(scanner.nextLine());
- if(a<min){
- min = a;
- System.out.println(min);
- }else{
- System.out.println(min);
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement