結果

問題 No.1852 Divide or Reduce
ユーザー 👑 colognecologne
提出日時 2022-02-25 21:46:50
言語 Python3
(3.11.6 + numpy 1.26.0 + scipy 1.11.3)
結果
AC  
実行時間 1,620 ms / 2,000 ms
コード長 352 bytes
コンパイル時間 417 ms
コンパイル使用メモリ 10,564 KB
実行使用メモリ 40,560 KB
最終ジャッジ日時 2023-09-16 16:32:50
合計ジャッジ時間 14,785 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 15 ms
7,880 KB
testcase_01 AC 341 ms
7,948 KB
testcase_02 AC 341 ms
7,952 KB
testcase_03 AC 343 ms
7,792 KB
testcase_04 AC 346 ms
7,792 KB
testcase_05 AC 337 ms
7,808 KB
testcase_06 AC 208 ms
25,692 KB
testcase_07 AC 217 ms
34,488 KB
testcase_08 AC 212 ms
32,852 KB
testcase_09 AC 209 ms
24,876 KB
testcase_10 AC 218 ms
33,788 KB
testcase_11 AC 219 ms
40,512 KB
testcase_12 AC 216 ms
40,512 KB
testcase_13 AC 217 ms
40,444 KB
testcase_14 AC 217 ms
40,384 KB
testcase_15 AC 216 ms
40,560 KB
testcase_16 AC 1,620 ms
30,448 KB
testcase_17 AC 1,602 ms
30,508 KB
testcase_18 AC 1,618 ms
30,384 KB
testcase_19 AC 1,582 ms
12,216 KB
testcase_20 AC 1,607 ms
30,696 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

def main():
    T = int(input())
    for i in range(T):
        N = int(input())
        *A, = map(lambda x: int(x)-1, input().split())
        s = sum(A)
        m = min(A)
        if s % 2 == 1 or (s % 2 == 0 and N % 2 == 0 and m % 2 == 1):
            print('First')
        else:
            print('Second')


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