結果

問題 No.1299 Random Array Score
ユーザー 👑 horiesinitihoriesiniti
提出日時 2023-02-09 08:02:22
言語 Ruby
(3.3.0)
結果
WA  
実行時間 -
コード長 166 bytes
コンパイル時間 39 ms
コンパイル使用メモリ 11,364 KB
実行使用メモリ 28,624 KB
最終ジャッジ日時 2023-09-20 18:40:57
合計ジャッジ時間 7,533 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 78 ms
15,308 KB
testcase_01 AC 85 ms
15,260 KB
testcase_02 AC 78 ms
15,148 KB
testcase_03 AC 155 ms
28,392 KB
testcase_04 AC 154 ms
27,844 KB
testcase_05 AC 138 ms
25,180 KB
testcase_06 AC 132 ms
24,132 KB
testcase_07 AC 135 ms
24,676 KB
testcase_08 AC 153 ms
27,924 KB
testcase_09 AC 81 ms
15,412 KB
testcase_10 AC 107 ms
20,320 KB
testcase_11 AC 85 ms
16,436 KB
testcase_12 AC 130 ms
23,708 KB
testcase_13 AC 154 ms
27,660 KB
testcase_14 AC 131 ms
23,908 KB
testcase_15 AC 132 ms
24,120 KB
testcase_16 AC 131 ms
24,224 KB
testcase_17 AC 91 ms
16,852 KB
testcase_18 AC 108 ms
20,704 KB
testcase_19 AC 121 ms
21,940 KB
testcase_20 AC 100 ms
18,700 KB
testcase_21 AC 80 ms
15,268 KB
testcase_22 AC 93 ms
16,984 KB
testcase_23 AC 133 ms
23,964 KB
testcase_24 AC 138 ms
24,984 KB
testcase_25 AC 133 ms
23,936 KB
testcase_26 AC 82 ms
15,256 KB
testcase_27 AC 97 ms
17,212 KB
testcase_28 AC 90 ms
16,420 KB
testcase_29 AC 97 ms
17,616 KB
testcase_30 AC 137 ms
23,476 KB
testcase_31 AC 99 ms
18,148 KB
testcase_32 AC 154 ms
27,644 KB
testcase_33 AC 160 ms
28,624 KB
testcase_34 AC 147 ms
26,984 KB
testcase_35 WA -
testcase_36 AC 148 ms
27,056 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.rb:1: warning: assigned but unused variable - n
Syntax OK

ソースコード

diff #

n,m=gets.split(" ").map{|e| e.to_i}
m1=998244353
s1=gets.split(" ").map{|e| e.to_i}.sum
ans=s1
r=2
m.digits(2).each{|e|
	ans=(ans*r)%m1 if e==1
	r=(r*r)%m1
}
puts ans
0