結果

問題 No.1686 Geschenkt
ユーザー mesame3993mesame3993
提出日時 2021-09-24 21:29:43
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 80 ms / 2,000 ms
コード長 163 bytes
コンパイル時間 302 ms
コンパイル使用メモリ 87,068 KB
実行使用メモリ 71,516 KB
最終ジャッジ日時 2023-09-18 20:42:05
合計ジャッジ時間 1,782 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 76 ms
71,392 KB
testcase_01 AC 75 ms
71,228 KB
testcase_02 AC 75 ms
71,232 KB
testcase_03 AC 78 ms
71,288 KB
testcase_04 AC 80 ms
71,268 KB
testcase_05 AC 76 ms
71,460 KB
testcase_06 AC 77 ms
71,248 KB
testcase_07 AC 78 ms
71,504 KB
testcase_08 AC 76 ms
71,248 KB
testcase_09 AC 77 ms
71,516 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
A = list(map(int, input().split()))
l = [0]*36
for i in A:
	l[i] += 1
ans = 0
for i in range(1, 36):
	if l[i-1] == 0:
		ans += i * l[i]
print(ans)
0