結果

問題 No.143 豆
ユーザー tabataba
提出日時 2024-08-30 11:15:35
言語 C#
(.NET 8.0.203)
結果
MLE  
実行時間 -
コード長 536 bytes
コンパイル時間 7,660 ms
コンパイル使用メモリ 167,028 KB
実行使用メモリ 185,588 KB
最終ジャッジ日時 2024-08-30 11:15:45
合計ジャッジ時間 9,870 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 58 ms
32,608 KB
testcase_01 AC 58 ms
30,332 KB
testcase_02 AC 59 ms
30,592 KB
testcase_03 AC 57 ms
30,592 KB
testcase_04 AC 59 ms
30,080 KB
testcase_05 AC 58 ms
30,316 KB
testcase_06 AC 59 ms
30,312 KB
testcase_07 AC 59 ms
30,592 KB
testcase_08 AC 59 ms
30,336 KB
testcase_09 AC 58 ms
30,608 KB
testcase_10 AC 58 ms
30,592 KB
testcase_11 AC 58 ms
30,720 KB
testcase_12 AC 64 ms
30,464 KB
testcase_13 AC 59 ms
30,440 KB
testcase_14 AC 60 ms
30,720 KB
testcase_15 AC 60 ms
30,464 KB
testcase_16 MLE -
権限があれば一括ダウンロードができます
コンパイルメッセージ
  復元対象のプロジェクトを決定しています...
  /home/judge/data/code/main.csproj を復元しました (94 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;
using System.Numerics;
public class Program
{
    static void Main()
    {
        var knf = ReadLineLong();
        var a = ReadLineLong();
        var b = knf[0] * knf[1];
        var s = a.Sum();
        Console.WriteLine(b - s < 0 ? -1 : b - s);
    }

    static string[] ReadLineSplit()
    {
        var s = Console.ReadLine() ?? "";
        return s.Split(' ');
    }
    static long[] ReadLineLong()
    {
        var s = Console.ReadLine() ?? "";
        return s.Split(' ').Select(long.Parse).ToArray();
    }
}
0