結果

問題 No.1299 Random Array Score
ユーザー 👑 horiesinitihoriesiniti
提出日時 2023-02-09 08:05:30
言語 Ruby
(3.3.0)
結果
AC  
実行時間 168 ms / 2,000 ms
コード長 273 bytes
コンパイル時間 120 ms
コンパイル使用メモリ 11,428 KB
実行使用メモリ 28,940 KB
最終ジャッジ日時 2023-09-20 18:42:43
合計ジャッジ時間 6,902 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 85 ms
15,148 KB
testcase_01 AC 88 ms
15,332 KB
testcase_02 AC 84 ms
15,144 KB
testcase_03 AC 165 ms
28,516 KB
testcase_04 AC 162 ms
27,792 KB
testcase_05 AC 147 ms
25,028 KB
testcase_06 AC 140 ms
24,044 KB
testcase_07 AC 143 ms
24,664 KB
testcase_08 AC 162 ms
28,000 KB
testcase_09 AC 86 ms
15,424 KB
testcase_10 AC 116 ms
20,260 KB
testcase_11 AC 92 ms
16,252 KB
testcase_12 AC 139 ms
23,676 KB
testcase_13 AC 161 ms
27,584 KB
testcase_14 AC 141 ms
24,072 KB
testcase_15 AC 141 ms
24,268 KB
testcase_16 AC 140 ms
23,924 KB
testcase_17 AC 98 ms
16,676 KB
testcase_18 AC 117 ms
20,660 KB
testcase_19 AC 129 ms
21,688 KB
testcase_20 AC 107 ms
18,668 KB
testcase_21 AC 86 ms
15,116 KB
testcase_22 AC 98 ms
16,828 KB
testcase_23 AC 140 ms
23,876 KB
testcase_24 AC 147 ms
25,136 KB
testcase_25 AC 141 ms
23,912 KB
testcase_26 AC 86 ms
15,164 KB
testcase_27 AC 102 ms
17,340 KB
testcase_28 AC 95 ms
16,400 KB
testcase_29 AC 102 ms
17,548 KB
testcase_30 AC 139 ms
23,232 KB
testcase_31 AC 105 ms
18,072 KB
testcase_32 AC 163 ms
27,496 KB
testcase_33 AC 168 ms
28,940 KB
testcase_34 AC 153 ms
27,096 KB
testcase_35 AC 167 ms
28,652 KB
testcase_36 AC 154 ms
27,072 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.rb:2: 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%m1
r=2
m.digits(2).each{|e|
	ans=(ans*r)%m1 if e==1
	r=(r*r)%m1
}
puts ans
0