結果
問題 |
No.21 平均の差
|
ユーザー |
![]() |
提出日時 | 2016-09-08 23:28:38 |
言語 | Java (openjdk 23) |
結果 |
AC
|
実行時間 | 130 ms / 5,000 ms |
コード長 | 336 bytes |
コンパイル時間 | 3,674 ms |
コンパイル使用メモリ | 74,384 KB |
実行使用メモリ | 54,556 KB |
最終ジャッジ日時 | 2024-11-15 22:26:24 |
合計ジャッジ時間 | 4,991 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 10 |
ソースコード
import java.util.Scanner; public class Test { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(), t = sc.nextInt(), max = 0, min = 1000; for(int i = 0; i < n; i++){ t = sc.nextInt(); max = Math.max(max, t); min = Math.min(min, t); } System.out.println(max-min); } }