結果
問題 | No.1299 Random Array Score |
ユーザー | marroncastle |
提出日時 | 2020-11-27 21:41:10 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 109 ms / 2,000 ms |
コード長 | 1,622 bytes |
コンパイル時間 | 285 ms |
コンパイル使用メモリ | 82,352 KB |
実行使用メモリ | 107,392 KB |
最終ジャッジ日時 | 2024-07-26 12:02:11 |
合計ジャッジ時間 | 4,593 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 41 ms
52,224 KB |
testcase_01 | AC | 39 ms
51,968 KB |
testcase_02 | AC | 41 ms
52,096 KB |
testcase_03 | AC | 104 ms
102,232 KB |
testcase_04 | AC | 106 ms
101,852 KB |
testcase_05 | AC | 83 ms
96,768 KB |
testcase_06 | AC | 80 ms
92,032 KB |
testcase_07 | AC | 80 ms
93,056 KB |
testcase_08 | AC | 102 ms
101,760 KB |
testcase_09 | AC | 45 ms
59,904 KB |
testcase_10 | AC | 65 ms
77,568 KB |
testcase_11 | AC | 51 ms
62,720 KB |
testcase_12 | AC | 74 ms
89,344 KB |
testcase_13 | AC | 98 ms
107,328 KB |
testcase_14 | AC | 79 ms
89,856 KB |
testcase_15 | AC | 79 ms
92,160 KB |
testcase_16 | AC | 81 ms
92,032 KB |
testcase_17 | AC | 50 ms
64,640 KB |
testcase_18 | AC | 65 ms
79,360 KB |
testcase_19 | AC | 71 ms
82,472 KB |
testcase_20 | AC | 58 ms
71,552 KB |
testcase_21 | AC | 46 ms
59,008 KB |
testcase_22 | AC | 50 ms
66,048 KB |
testcase_23 | AC | 78 ms
91,648 KB |
testcase_24 | AC | 82 ms
96,896 KB |
testcase_25 | AC | 76 ms
89,344 KB |
testcase_26 | AC | 47 ms
59,136 KB |
testcase_27 | AC | 54 ms
66,688 KB |
testcase_28 | AC | 49 ms
64,384 KB |
testcase_29 | AC | 54 ms
68,864 KB |
testcase_30 | AC | 80 ms
88,960 KB |
testcase_31 | AC | 55 ms
68,864 KB |
testcase_32 | AC | 100 ms
107,392 KB |
testcase_33 | AC | 109 ms
99,968 KB |
testcase_34 | AC | 83 ms
96,384 KB |
testcase_35 | AC | 107 ms
100,224 KB |
testcase_36 | AC | 82 ms
96,128 KB |
ソースコード
MOD = 998244353 class ModInt: def __init__(self, x): self.x = x % MOD def __str__(self): return str(self.x) __repr__ = __str__ def __add__(self, other): return ( ModInt(self.x + other.x) if isinstance(other, ModInt) else ModInt(self.x + other) ) def __sub__(self, other): return ( ModInt(self.x - other.x) if isinstance(other, ModInt) else ModInt(self.x - other) ) def __mul__(self, other): return ( ModInt(self.x * other.x) if isinstance(other, ModInt) else ModInt(self.x * other) ) def __truediv__(self, other): return ( ModInt( self.x * pow(other.x, MOD - 2, MOD) ) if isinstance(other, ModInt) else ModInt(self.x * pow(other, MOD - 2, MOD)) ) __floordiv__ = __truediv__ def __pow__(self, other): return ( ModInt(pow(self.x, other.x, MOD)) if isinstance(other, ModInt) else ModInt(pow(self.x, other, MOD)) ) __radd__ = __add__ def __rsub__(self, other): return ( ModInt(other.x - self.x) if isinstance(other, ModInt) else ModInt(other - self.x) ) __rmul__ = __mul__ def __rtruediv__(self, other): return ( ModInt( other.x * pow(self.x, MOD - 2, MOD) ) if isinstance(other, ModInt) else ModInt(other * pow(self.x, MOD - 2, MOD)) ) def __rpow__(self, other): return ( ModInt(pow(other.x, self.x, MOD)) if isinstance(other, ModInt) else ModInt(pow(other, self.x, MOD)) ) N, K = map(int, input().split()) A = list(map(int, input().split())) S = ModInt(sum(A)) print(S*pow(ModInt(2),K))