結果

問題 No.1751 Fortune Nim
ユーザー Eki1009Eki1009
提出日時 2021-11-19 22:20:06
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 174 bytes
コンパイル時間 383 ms
コンパイル使用メモリ 87,080 KB
実行使用メモリ 100,588 KB
最終ジャッジ日時 2023-08-30 08:59:58
合計ジャッジ時間 5,040 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 70 ms
71,256 KB
testcase_01 AC 70 ms
71,400 KB
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 AC 71 ms
71,132 KB
testcase_06 AC 71 ms
71,252 KB
testcase_07 AC 69 ms
71,384 KB
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
testcase_14 WA -
testcase_15 WA -
testcase_16 AC 96 ms
90,228 KB
testcase_17 AC 92 ms
87,244 KB
testcase_18 AC 101 ms
92,468 KB
testcase_19 AC 93 ms
87,008 KB
testcase_20 AC 113 ms
100,032 KB
testcase_21 AC 93 ms
88,816 KB
testcase_22 AC 111 ms
100,052 KB
testcase_23 AC 96 ms
92,464 KB
testcase_24 WA -
testcase_25 WA -
testcase_26 WA -
testcase_27 WA -
testcase_28 AC 113 ms
100,444 KB
testcase_29 AC 112 ms
100,256 KB
testcase_30 AC 114 ms
100,080 KB
testcase_31 AC 111 ms
100,288 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

mod = 998244353
n = int(input())
s = sum(map(int,input().split()))
if n == 1:
    print(665496236)
    exit()
ans = (1-pow(pow(-3,mod-2,mod),s,mod))*(mod+1)//2%mod
print(ans)
0