結果

問題 No.3100 始業式
ユーザー prin_kemkemprin_kemkem
提出日時 2023-04-01 02:42:34
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 81 ms / 2,000 ms
コード長 604 bytes
コンパイル時間 545 ms
コンパイル使用メモリ 81,272 KB
実行使用メモリ 77,112 KB
最終ジャッジ日時 2023-10-24 11:59:16
合計ジャッジ時間 1,189 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 81 ms
77,112 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from collections import defaultdict, deque, Counter
import copy
from itertools import combinations, permutations, product, accumulate
from heapq import heapify, heappop, heappush
import math
import bisect
import sys
# sys.setrecursionlimit(700000)
input = lambda: sys.stdin.readline().rstrip('\n')
inf = float('inf')
mod1 = 10**9+7
mod2 = 998244353
def ceil_div(x, y): return -(-x//y)

#################################################

T = int(input())
for _ in range(T):
    N = int(input())
    F = list(map(int, input().split()))
    ac = F.count(0)
    wa = ac+1 if ac+1 <= N else ac-1
    print(wa)
0