結果

問題 No.8100 始業式
コンテスト
ユーザー KDKJ
提出日時 2023-12-22 16:59:27
言語 PyPy3
(7.3.17)
コンパイル:
pypy3 -mpy_compile _filename_
実行:
pypy3 _filename_
結果
AC  
実行時間 95 ms / 2,000 ms
コード長 647 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 175 ms
コンパイル使用メモリ 85,504 KB
実行使用メモリ 82,560 KB
最終ジャッジ日時 2026-04-14 07:04:59
合計ジャッジ時間 949 ms
ジャッジサーバーID
(参考情報)
judge2_0 / judge3_1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 1
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

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