結果

問題 No.1852 Divide or Reduce
ユーザー 👑 tamatotamato
提出日時 2022-02-25 21:28:59
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 317 ms / 2,000 ms
コード長 528 bytes
コンパイル時間 293 ms
コンパイル使用メモリ 87,660 KB
実行使用メモリ 136,116 KB
最終ジャッジ日時 2023-09-16 16:07:53
合計ジャッジ時間 7,504 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 68 ms
71,452 KB
testcase_01 AC 193 ms
79,116 KB
testcase_02 AC 189 ms
79,048 KB
testcase_03 AC 189 ms
78,908 KB
testcase_04 AC 189 ms
78,728 KB
testcase_05 AC 190 ms
78,936 KB
testcase_06 AC 238 ms
123,576 KB
testcase_07 AC 241 ms
123,672 KB
testcase_08 AC 247 ms
131,256 KB
testcase_09 AC 239 ms
121,956 KB
testcase_10 AC 247 ms
127,136 KB
testcase_11 AC 249 ms
134,752 KB
testcase_12 AC 252 ms
134,832 KB
testcase_13 AC 253 ms
136,116 KB
testcase_14 AC 251 ms
135,956 KB
testcase_15 AC 252 ms
135,420 KB
testcase_16 AC 308 ms
102,972 KB
testcase_17 AC 310 ms
102,688 KB
testcase_18 AC 317 ms
102,768 KB
testcase_19 AC 247 ms
104,172 KB
testcase_20 AC 261 ms
101,116 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

mod = 1000000007
eps = 10**-9


def main():
    import sys
    input = sys.stdin.readline

    for _ in range(int(input())):
        N = int(input())
        A = list(map(int, input().split()))

        A.sort()
        S = sum(A) - N
        if S & 1:
            print("First")
        else:
            if N & 1:
                print("Second")
            else:
                if A[0] & 1:
                    print("Second")
                else:
                    print("First")


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