結果

問題 No.716 距離
ユーザー Mcpu3Mcpu3
提出日時 2018-07-28 10:04:59
言語 Java21
(openjdk 21)
結果
AC  
実行時間 226 ms / 2,000 ms
コード長 309 bytes
コンパイル時間 2,816 ms
コンパイル使用メモリ 73,712 KB
実行使用メモリ 58,860 KB
最終ジャッジ日時 2023-09-19 06:00:27
合計ジャッジ時間 12,487 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 221 ms
56,948 KB
testcase_01 AC 220 ms
57,324 KB
testcase_02 AC 218 ms
57,896 KB
testcase_03 AC 221 ms
56,992 KB
testcase_04 AC 222 ms
57,208 KB
testcase_05 AC 226 ms
58,860 KB
testcase_06 AC 222 ms
57,540 KB
testcase_07 AC 155 ms
56,764 KB
testcase_08 AC 157 ms
56,732 KB
testcase_09 AC 154 ms
56,908 KB
testcase_10 AC 213 ms
56,668 KB
testcase_11 AC 190 ms
56,660 KB
testcase_12 AC 213 ms
57,528 KB
testcase_13 AC 204 ms
57,440 KB
testcase_14 AC 151 ms
56,836 KB
testcase_15 AC 211 ms
56,788 KB
testcase_16 AC 205 ms
56,848 KB
testcase_17 AC 225 ms
57,984 KB
testcase_18 AC 163 ms
56,656 KB
testcase_19 AC 198 ms
56,836 KB
testcase_20 AC 158 ms
56,768 KB
testcase_21 AC 165 ms
56,936 KB
testcase_22 AC 178 ms
56,568 KB
testcase_23 AC 170 ms
56,848 KB
testcase_24 AC 221 ms
58,400 KB
testcase_25 AC 199 ms
56,632 KB
testcase_26 AC 222 ms
56,888 KB
testcase_27 AC 215 ms
56,784 KB
testcase_28 AC 162 ms
56,992 KB
testcase_29 AC 216 ms
58,620 KB
testcase_30 AC 201 ms
58,492 KB
testcase_31 AC 211 ms
56,904 KB
testcase_32 AC 217 ms
57,048 KB
testcase_33 AC 213 ms
58,644 KB
testcase_34 AC 219 ms
58,272 KB
testcase_35 AC 161 ms
56,660 KB
testcase_36 AC 170 ms
56,728 KB
testcase_37 AC 163 ms
56,564 KB
testcase_38 AC 190 ms
56,916 KB
testcase_39 AC 222 ms
58,476 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

class Main{
	public static void main(String[] args) {
		Scanner stdIn=new Scanner(System.in);
		int n=stdIn.nextInt(),a=0,b=stdIn.nextInt(),t=b,m=200000,i;
		for(i=1;i<n;i++) {
			a=stdIn.nextInt();
			if(m>a-t) m=a-t;
			t=a;
		}
		System.out.print(m+"\n"+(a-b));
	}
}
0