結果
| 問題 |
No.716 距離
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2021-07-21 21:57:32 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 45 ms / 2,000 ms |
| コード長 | 189 bytes |
| コンパイル時間 | 155 ms |
| コンパイル使用メモリ | 81,968 KB |
| 実行使用メモリ | 52,480 KB |
| 最終ジャッジ日時 | 2024-07-17 14:18:27 |
| 合計ジャッジ時間 | 2,969 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 40 |
ソースコード
N = int(input())
a = list(map(int, input().split()))
d = a[N - 1] - a[0]
for i in range(0, N - 1):
if d > a[i + 1] - a[i]:
d = a[i + 1] - a[i]
print(d)
print(a[N - 1] - a[0])