結果

問題 No.1852 Divide or Reduce
ユーザー shinichishinichi
提出日時 2022-03-25 23:11:47
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 395 ms / 2,000 ms
コード長 355 bytes
コンパイル時間 186 ms
コンパイル使用メモリ 81,996 KB
実行使用メモリ 137,372 KB
最終ジャッジ日時 2024-04-22 08:05:21
合計ジャッジ時間 6,655 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 42 ms
51,712 KB
testcase_01 AC 175 ms
78,080 KB
testcase_02 AC 176 ms
78,572 KB
testcase_03 AC 177 ms
78,164 KB
testcase_04 AC 179 ms
78,208 KB
testcase_05 AC 177 ms
78,208 KB
testcase_06 AC 142 ms
122,564 KB
testcase_07 AC 145 ms
127,608 KB
testcase_08 AC 149 ms
131,300 KB
testcase_09 AC 138 ms
122,636 KB
testcase_10 AC 140 ms
112,112 KB
testcase_11 AC 152 ms
137,276 KB
testcase_12 AC 149 ms
136,168 KB
testcase_13 AC 151 ms
135,472 KB
testcase_14 AC 150 ms
137,372 KB
testcase_15 AC 150 ms
136,784 KB
testcase_16 AC 388 ms
110,184 KB
testcase_17 AC 395 ms
110,688 KB
testcase_18 AC 394 ms
111,204 KB
testcase_19 AC 352 ms
103,744 KB
testcase_20 AC 380 ms
107,804 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

T = int(input())

First, Second = "First", "Second"
ans = []
for _ in range(T):
    N = int(input())
    A = list(map(int, input().split()))
    mins = min(A)
    sums = sum(A)
    if (sums - N) % 2 == 1:
        ans.append(First)
    elif N % 2 == 0 and mins % 2 == 0:
        ans.append(First)
    else:
        ans.append(Second)

print(*ans, sep="\n")
0