結果
| 問題 |
No.2282 Boxed Nim
|
| コンテスト | |
| ユーザー |
ks2m
|
| 提出日時 | 2023-04-28 21:38:54 |
| 言語 | Java (openjdk 23) |
| 結果 |
AC
|
| 実行時間 | 593 ms / 2,000 ms |
| コード長 | 455 bytes |
| コンパイル時間 | 1,881 ms |
| コンパイル使用メモリ | 74,216 KB |
| 実行使用メモリ | 48,744 KB |
| 最終ジャッジ日時 | 2024-11-17 20:38:07 |
| 合計ジャッジ時間 | 9,985 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 17 |
ソースコード
import java.util.Scanner;
public class Main {
public static void main(String[] args) throws Exception {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int[] a = new int[n];
for (int i = 0; i < n; i++) {
a[i] = sc.nextInt();
}
sc.close();
int x = 0;
for (int i = 0; i < n; i++) {
if (a[i] == 0) {
x ^= 1;
}
}
if (x == 0) {
System.out.println("Second");
} else {
System.out.println("First");
}
}
}
ks2m