結果

問題 No.2044 Infinite Nim
ユーザー merlinmerlin
提出日時 2022-08-19 22:14:20
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 610 bytes
コンパイル時間 2,267 ms
コンパイル使用メモリ 74,256 KB
実行使用メモリ 51,044 KB
最終ジャッジ日時 2024-04-17 00:55:37
合計ジャッジ時間 8,761 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 56 ms
37,168 KB
testcase_01 AC 56 ms
36,812 KB
testcase_02 AC 58 ms
37,072 KB
testcase_03 AC 57 ms
36,888 KB
testcase_04 AC 59 ms
36,816 KB
testcase_05 AC 58 ms
37,208 KB
testcase_06 AC 59 ms
36,680 KB
testcase_07 AC 58 ms
36,984 KB
testcase_08 AC 59 ms
37,028 KB
testcase_09 WA -
testcase_10 WA -
testcase_11 AC 59 ms
36,944 KB
testcase_12 AC 60 ms
36,720 KB
testcase_13 AC 166 ms
45,096 KB
testcase_14 AC 135 ms
41,492 KB
testcase_15 AC 127 ms
41,068 KB
testcase_16 AC 144 ms
41,592 KB
testcase_17 AC 211 ms
45,076 KB
testcase_18 AC 128 ms
41,028 KB
testcase_19 AC 129 ms
41,784 KB
testcase_20 AC 173 ms
45,520 KB
testcase_21 AC 213 ms
48,000 KB
testcase_22 WA -
testcase_23 WA -
testcase_24 AC 211 ms
46,028 KB
testcase_25 WA -
testcase_26 AC 203 ms
45,084 KB
testcase_27 WA -
testcase_28 WA -
testcase_29 AC 182 ms
45,776 KB
testcase_30 WA -
testcase_31 AC 229 ms
48,948 KB
testcase_32 AC 213 ms
48,992 KB
testcase_33 AC 240 ms
49,148 KB
testcase_34 AC 173 ms
49,276 KB
testcase_35 AC 246 ms
51,044 KB
testcase_36 AC 57 ms
36,944 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.io.*;
import java.util.*;

class Main
{
    public static void main(String args[])throws Exception
    {
        BufferedReader bu=new BufferedReader(new InputStreamReader(System.in));
        StringBuilder sb=new StringBuilder();
        int n=Integer.parseInt(bu.readLine());
        String s[]=bu.readLine().split(" ");
        int xor=0,inf=0,i,a;
        for(i=0;i<n;i++)
        {
            a=Integer.parseInt(s[i]);
            if(a<0) a=2;
            else xor^=a;
        }

        if(xor==0) sb.append("Second");
        else sb.append("First");
        System.out.println(sb);
    }
}
0