結果

問題 No.8100 始業式
ユーザー MasKoaTS
提出日時 2023-03-31 21:39:25
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 81 ms / 2,000 ms
コード長 181 bytes
コンパイル時間 144 ms
コンパイル使用メモリ 82,576 KB
実行使用メモリ 76,320 KB
最終ジャッジ日時 2024-09-23 00:12:56
合計ジャッジ時間 680 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 1
権限があれば一括ダウンロードができます

ソースコード

diff #

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