結果

問題 No.3100 始業式
ユーザー KDKJKDKJ
提出日時 2023-12-22 16:59:27
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 119 ms / 2,000 ms
コード長 647 bytes
コンパイル時間 203 ms
コンパイル使用メモリ 81,700 KB
実行使用メモリ 77,656 KB
最終ジャッジ日時 2023-12-22 16:59:28
合計ジャッジ時間 952 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

from heapq import heappush, heappop, heapify
import sys
from collections import defaultdict, deque
from math import ceil, floor, sqrt, factorial, gcd
from itertools import permutations, combinations, chain
from bisect import bisect_left, bisect_right
sys.setrecursionlimit(10**7)
# input = sys.stdin.readline
vector1 = [[-1, 0], [1, 0], [0, 1], [0, -1]]
vector2 = [[0, 1], [1, 0], [-1, 0], [0, -1],
           [1.-1], [-1, 1], [1, 1], [-1, 1]]


def main():
    T = int(input())
    for _ in range(T):
        N = int(input())
        f = list(map(int, input().split()))
        print((N-sum(f)+1) % (N+1))


if __name__ == '__main__':
    main()
0