結果
問題 | No.1852 Divide or Reduce |
ユーザー |
![]() |
提出日時 | 2022-02-27 00:25:33 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
AC
|
実行時間 | 730 ms / 2,000 ms |
コード長 | 579 bytes |
コンパイル時間 | 88 ms |
コンパイル使用メモリ | 12,416 KB |
実行使用メモリ | 42,700 KB |
最終ジャッジ日時 | 2024-07-04 21:52:42 |
合計ジャッジ時間 | 9,423 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | AC * 20 |
ソースコード
# 概ね正しいことを考えていたのにまとめきれなかった import sys input = sys.stdin.readline T=int(input()) for tests in range(T): N=int(input()) A=list(map(int,input().split())) S=sum(A) MIN=min(A) if MIN==1: if (S-N)%2==1: print("First") else: print("Second") continue if (S-N)%2==1: print("First") continue if N%2==1: print("Second") else: if MIN%2==0: print("First") else: print("Second")