結果

問題 No.2335 Jump
ユーザー yupoohyupooh
提出日時 2023-06-02 21:40:27
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 117 ms / 2,000 ms
コード長 185 bytes
コンパイル時間 676 ms
コンパイル使用メモリ 87,052 KB
実行使用メモリ 91,412 KB
最終ジャッジ日時 2023-08-28 02:59:15
合計ジャッジ時間 4,189 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 91 ms
71,428 KB
testcase_01 AC 91 ms
71,444 KB
testcase_02 AC 92 ms
71,368 KB
testcase_03 AC 91 ms
71,448 KB
testcase_04 AC 91 ms
71,360 KB
testcase_05 AC 90 ms
71,572 KB
testcase_06 AC 91 ms
71,424 KB
testcase_07 AC 91 ms
71,296 KB
testcase_08 AC 94 ms
71,420 KB
testcase_09 AC 93 ms
71,368 KB
testcase_10 AC 92 ms
71,768 KB
testcase_11 AC 90 ms
71,460 KB
testcase_12 AC 117 ms
91,012 KB
testcase_13 AC 116 ms
91,044 KB
testcase_14 AC 115 ms
91,132 KB
testcase_15 AC 114 ms
91,144 KB
testcase_16 AC 113 ms
91,276 KB
testcase_17 AC 115 ms
90,308 KB
testcase_18 AC 116 ms
91,076 KB
testcase_19 AC 115 ms
91,412 KB
testcase_20 AC 111 ms
90,516 KB
testcase_21 AC 113 ms
90,756 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
input = sys.stdin.readline
from collections import defaultdict
n=int(input())
a=list(map(int,input().split()))
now=a[0]-1
for i in range(n-1):
  now+=a[i+1]-a[i]-1
print(now)
0