結果
| 問題 | No.21 平均の差 |
| ユーザー |
kou6839
|
| 提出日時 | 2014-11-16 15:46:56 |
| 言語 | Java (openjdk 27.0.1.0.3 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 56 ms / 5,000 ms |
| + 196µs | |
| コード長 | 378 bytes |
| 記録 | |
| コンパイル時間 | 1,314 ms |
| コンパイル使用メモリ | 85,056 KB |
| 実行使用メモリ | 45,184 KB |
| 最終ジャッジ日時 | 2026-10-10 01:02:43 |
| 合計ジャッジ時間 | 3,007 ms |
|
ジャッジサーバーID (参考情報) |
judge5_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 10 |
ソースコード
import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int m = sc.nextInt();
int max=0;
int min=Integer.MAX_VALUE;
for(int i=0;i<n;i++){
int temp=sc.nextInt();
max=Math.max(max, temp);
min=Math.min(min, temp);
}
System.out.println(max-min);
}
}
kou6839