結果
| 問題 |
No.1299 Random Array Score
|
| コンテスト | |
| ユーザー |
horiesiniti
|
| 提出日時 | 2023-02-09 08:02:22 |
| 言語 | Ruby (3.4.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 166 bytes |
| コンパイル時間 | 237 ms |
| コンパイル使用メモリ | 7,424 KB |
| 実行使用メモリ | 26,240 KB |
| 最終ジャッジ日時 | 2024-07-06 13:34:19 |
| 合計ジャッジ時間 | 6,723 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 33 WA * 1 |
コンパイルメッセージ
Main.rb:1: warning: assigned but unused variable - n Syntax OK
ソースコード
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
horiesiniti