結果

問題 No.1751 Fortune Nim
ユーザー Eki1009Eki1009
提出日時 2021-11-19 23:06:40
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 191 bytes
コンパイル時間 520 ms
コンパイル使用メモリ 87,144 KB
実行使用メモリ 104,828 KB
最終ジャッジ日時 2023-08-30 10:13:19
合計ジャッジ時間 5,927 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 70 ms
71,344 KB
testcase_01 AC 71 ms
71,144 KB
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 AC 73 ms
71,388 KB
testcase_06 AC 70 ms
71,152 KB
testcase_07 AC 72 ms
71,120 KB
testcase_08 AC 111 ms
98,700 KB
testcase_09 WA -
testcase_10 AC 97 ms
93,752 KB
testcase_11 WA -
testcase_12 AC 96 ms
93,180 KB
testcase_13 AC 117 ms
99,728 KB
testcase_14 AC 102 ms
96,064 KB
testcase_15 AC 102 ms
98,576 KB
testcase_16 AC 108 ms
101,580 KB
testcase_17 AC 99 ms
96,020 KB
testcase_18 AC 118 ms
99,784 KB
testcase_19 AC 100 ms
96,144 KB
testcase_20 AC 122 ms
100,040 KB
testcase_21 AC 105 ms
98,924 KB
testcase_22 AC 124 ms
100,064 KB
testcase_23 AC 113 ms
104,828 KB
testcase_24 AC 123 ms
100,604 KB
testcase_25 WA -
testcase_26 AC 122 ms
100,700 KB
testcase_27 WA -
testcase_28 AC 125 ms
100,432 KB
testcase_29 AC 125 ms
100,368 KB
testcase_30 AC 125 ms
100,440 KB
testcase_31 AC 123 ms
100,552 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

mod = 998244353
n = int(input())
A = list(map(int,input().split()))
x = 0
for a in A:
    x ^= a
t = sum(A)-x
if x:
    t += 1
ans = (1-pow(pow(-3,mod-2,mod),t,mod))*(mod+1)//2%mod
print(ans)
0