結果

問題 No.2550 MORE! JUMP! MORE!
ユーザー 👑 kakel-sankakel-san
提出日時 2024-01-30 00:31:56
言語 C#
(.NET 8.0.203)
結果
AC  
実行時間 129 ms / 2,000 ms
コード長 886 bytes
コンパイル時間 7,352 ms
コンパイル使用メモリ 158,304 KB
実行使用メモリ 196,416 KB
最終ジャッジ日時 2024-01-30 00:32:20
合計ジャッジ時間 14,766 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 77 ms
32,420 KB
testcase_01 AC 77 ms
32,420 KB
testcase_02 AC 77 ms
32,420 KB
testcase_03 AC 78 ms
32,420 KB
testcase_04 AC 77 ms
32,420 KB
testcase_05 AC 76 ms
32,420 KB
testcase_06 AC 76 ms
32,420 KB
testcase_07 AC 76 ms
32,420 KB
testcase_08 AC 75 ms
32,420 KB
testcase_09 AC 75 ms
32,420 KB
testcase_10 AC 76 ms
32,420 KB
testcase_11 AC 77 ms
32,420 KB
testcase_12 AC 76 ms
32,420 KB
testcase_13 AC 77 ms
32,420 KB
testcase_14 AC 77 ms
32,420 KB
testcase_15 AC 76 ms
32,420 KB
testcase_16 AC 92 ms
32,420 KB
testcase_17 AC 76 ms
32,420 KB
testcase_18 AC 76 ms
32,420 KB
testcase_19 AC 75 ms
32,420 KB
testcase_20 AC 108 ms
43,420 KB
testcase_21 AC 96 ms
40,228 KB
testcase_22 AC 83 ms
35,236 KB
testcase_23 AC 112 ms
48,788 KB
testcase_24 AC 122 ms
48,768 KB
testcase_25 AC 106 ms
42,708 KB
testcase_26 AC 106 ms
45,848 KB
testcase_27 AC 121 ms
46,516 KB
testcase_28 AC 109 ms
44,632 KB
testcase_29 AC 112 ms
47,136 KB
testcase_30 AC 123 ms
49,272 KB
testcase_31 AC 122 ms
49,272 KB
testcase_32 AC 125 ms
49,276 KB
testcase_33 AC 124 ms
49,272 KB
testcase_34 AC 124 ms
49,272 KB
testcase_35 AC 129 ms
49,276 KB
testcase_36 AC 123 ms
49,276 KB
testcase_37 AC 124 ms
49,276 KB
testcase_38 AC 124 ms
49,276 KB
testcase_39 AC 124 ms
196,416 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
  復元対象のプロジェクトを決定しています...
  /home/judge/data/code/main.csproj を復元しました (102 ms)。
MSBuild のバージョン 17.7.3+8ec440e68 (.NET)
  main -> /home/judge/data/code/bin/Release/net7.0/main.dll
  main -> /home/judge/data/code/bin/Release/net7.0/publish/

ソースコード

diff #

using System;
using static System.Console;
using System.Linq;
using System.Collections.Generic;

class Program
{
    static int NN => int.Parse(ReadLine());
    static int[] NList => ReadLine().Split().Select(int.Parse).ToArray();
    static int[][] NArr(long n) => Enumerable.Repeat(0, (int)n).Select(_ => NList).ToArray();
    public static void Main()
    {
        Solve();
    }
    static void Solve()
    {
        var n = NN;
        var a = NList;
        var mod = 998_244_353;
        var ans = 0L;
        for (var i = 0; i < n; ++i)
        {
            if (i + 1 < n) ans = (ans + (long)a[i] * (i + 2) % mod) % mod;
            else ans = (ans + (long)a[i] * (i + 2) * 2 % mod) % mod;
        }
        ans = ans * 499122177 % mod * 499122177 % mod;
        for (var i = 0; i < n - 1; ++i) ans = ans * 2 % mod;
        WriteLine(ans);
    }
}
0