結果

問題 No.490 yukiソート
ユーザー tsunabit
提出日時 2019-06-09 21:26:04
言語 Java
(openjdk 23)
結果
WA  
実行時間 -
コード長 856 bytes
コンパイル時間 3,534 ms
コンパイル使用メモリ 80,468 KB
実行使用メモリ 55,140 KB
最終ジャッジ日時 2024-10-06 00:17:21
合計ジャッジ時間 11,324 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 13 WA * 21
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;
import java.io.*;
import java.math.*;

public class No490 {
    public static void main(String[] args) {
    	try {
    		// 入力元がファイル
//        	File inputFile = new File("");
//        	Scanner sc = new Scanner(inputFile);
            // 標準入力から読み込む際に、Scannerオブジェクトを使う。
            Scanner sc = new Scanner(System.in);
            int n = Integer.parseInt(sc.nextLine());
            String[] a = sc.nextLine().split(" ");
            int[] b = new int[n];
            for(int i = 0; i < a.length; i++) {
            	b[i] = Integer.parseInt(a[i]);
            }
            Arrays.sort(b);
            for(int i = 0; i < n; i++) {
            	System.out.print(b[i] + " ");
            }
            System.out.println("");
    	}catch(Exception e) {
    		
    	}
    }
}
0