結果

問題 No.2729 Addition and Multiplication in yukicoder (Easy)
ユーザー bluemeganebluemegane
提出日時 2024-04-19 22:41:51
言語 C#
(.NET 8.0.203)
結果
AC  
実行時間 182 ms / 2,000 ms
コード長 526 bytes
コンパイル時間 7,009 ms
コンパイル使用メモリ 165,296 KB
実行使用メモリ 216,360 KB
最終ジャッジ日時 2024-04-19 22:42:41
合計ジャッジ時間 10,660 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 47 ms
28,928 KB
testcase_01 AC 48 ms
29,056 KB
testcase_02 AC 165 ms
71,772 KB
testcase_03 AC 162 ms
51,632 KB
testcase_04 AC 167 ms
52,916 KB
testcase_05 AC 147 ms
53,412 KB
testcase_06 AC 155 ms
70,988 KB
testcase_07 AC 147 ms
62,208 KB
testcase_08 AC 130 ms
71,184 KB
testcase_09 AC 46 ms
29,056 KB
testcase_10 AC 45 ms
28,800 KB
testcase_11 AC 46 ms
28,544 KB
testcase_12 AC 167 ms
70,484 KB
testcase_13 AC 182 ms
70,740 KB
testcase_14 AC 156 ms
70,784 KB
testcase_15 AC 152 ms
70,992 KB
testcase_16 AC 123 ms
61,056 KB
testcase_17 AC 122 ms
61,312 KB
testcase_18 AC 139 ms
66,060 KB
testcase_19 AC 122 ms
216,360 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
  復元対象のプロジェクトを決定しています...
  /home/judge/data/code/main.csproj を復元しました (83 ms)。
MSBuild のバージョン 17.9.6+a4ecab324 (.NET)
  main -> /home/judge/data/code/bin/Release/net8.0/main.dll
  main -> /home/judge/data/code/bin/Release/net8.0/publish/

ソースコード

diff #

using System;

public class Hello
{
    public static int MOD = 998244353;
    static void Main()
    {
        var n = int.Parse(Console.ReadLine().Trim());
        string[] line = Console.ReadLine().Trim().Split(' ');
        var a = Array.ConvertAll(line, long.Parse);
        getAns(n, a);
    }
    static void getAns(int n, long[] a)
    {
        Array.Sort(a);
        var x = 0L;
        foreach (var z in a)
        {
            x = x * 10 + z;
            x %= MOD;
        }
        Console.WriteLine(x);
    }
}
0