A

import java.util.Arrays;
import java.util.Scanner;

public class T216908 {
    
    public static void main(String[] args) {
        int n;
        Scanner in = new Scanner(System.in);

        n = in.nextInt();

        int[] scores = new int[n];

        for (int i = 0; i < scores.length; i++) {
            scores[i] = in.nextInt();
        }

        int min = Arrays.stream(scores).min().getAsInt();
        int max = Arrays.stream(scores).max().getAsInt();

        for (int i = 0; i < scores.length; i++) {
            scores[i] = 100 * (scores[i] -min)/(max-min);
            System.out.print(scores[i]);
            System.out.print(" ");
        }
    }
}

评论

Your browser is out-of-date!

Update your browser to view this website correctly. Update my browser now

×