結果
問題 |
No.21 平均の差
|
ユーザー |
|
提出日時 | 2019-02-14 23:42:16 |
言語 | Java (openjdk 23) |
結果 |
WA
|
実行時間 | - |
コード長 | 310 bytes |
コンパイル時間 | 2,173 ms |
コンパイル使用メモリ | 74,316 KB |
実行使用メモリ | 56,356 KB |
最終ジャッジ日時 | 2024-09-13 11:36:40 |
合計ジャッジ時間 | 4,068 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | WA * 10 |
ソースコード
import java.util.*; class Main { static Scanner sc = new Scanner(System.in); public static void main(String[] args) { int n = sc.nextInt(); int k = sc.nextInt(); int[] ar = new int[n]; for (int i=0; i<n; i++) ar[i] = sc.nextInt(); Arrays.sort(ar); System.out.println((ar[0]+ar[n-1])/2); } }