Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package KP.acmp.task41;
- import java.util.Arrays;
- import java.util.Scanner;
- public class Main {
- public static void main(String[] args) {
- int[] temperatures = new int[201];
- Arrays.fill(temperatures, 0);
- Scanner scan = new Scanner(System.in);
- int n = scan.nextInt();
- for (int i = 0; i < n; i++) {
- int t = scan.nextInt();
- temperatures[t + 101]++;
- }
- for (int i = 0; i < temperatures.length; i++) {
- for (int j = 0; j < temperatures[i]; j++) {
- System.out.println(i - 101 + " ");
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement