結果

問題 No.3163 [Cherry 7th Tune N] Draft
ユーザー Maeda
提出日時 2025-08-26 10:53:05
言語 Java
(openjdk 23)
結果
AC  
実行時間 225 ms / 2,000 ms
コード長 427 bytes
コンパイル時間 2,329 ms
コンパイル使用メモリ 77,540 KB
実行使用メモリ 48,696 KB
最終ジャッジ日時 2025-08-26 10:53:10
合計ジャッジ時間 4,697 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1
other AC * 7
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;
//import java.util.Arrays;
//import java.util.Collections;

public class Main {
    public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int t = scan.nextInt();
		for(int i = 0 ; i < t ; i++){
			int[] size = new int[5];
			for(int j = 0 ; j < size.length; j++){
				size[j] = scan.nextInt(); 
			}
			Arrays.sort(size);
			System.out.println((size[4] - size[0]));
		}
    }
}
0