結果

問題 No.143 豆
ユーザー cccccc
提出日時 2022-07-15 16:42:36
言語 C#
(.NET 8.0.203)
結果
MLE  
(最新)
AC  
(最初)
実行時間 -
コード長 394 bytes
コンパイル時間 10,088 ms
コンパイル使用メモリ 145,420 KB
実行使用メモリ 164,260 KB
最終ジャッジ日時 2023-09-09 18:51:15
合計ジャッジ時間 12,350 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 51 ms
30,604 KB
testcase_01 AC 50 ms
28,796 KB
testcase_02 AC 50 ms
28,644 KB
testcase_03 AC 50 ms
28,752 KB
testcase_04 AC 51 ms
28,964 KB
testcase_05 AC 50 ms
28,520 KB
testcase_06 AC 51 ms
30,564 KB
testcase_07 AC 51 ms
28,560 KB
testcase_08 AC 50 ms
28,628 KB
testcase_09 AC 51 ms
28,688 KB
testcase_10 AC 51 ms
28,612 KB
testcase_11 AC 51 ms
28,700 KB
testcase_12 AC 52 ms
28,880 KB
testcase_13 AC 51 ms
28,932 KB
testcase_14 AC 52 ms
28,524 KB
testcase_15 AC 52 ms
28,892 KB
testcase_16 MLE -
権限があれば一括ダウンロードができます
コンパイルメッセージ
  Determining projects to restore...
  Restored /home/judge/data/code/main.csproj (in 148 ms).
.NET 向け Microsoft (R) Build Engine バージョン 17.0.0-preview-21470-01+cb055d28f
Copyright (C) Microsoft Corporation.All rights reserved.

  プレビュー版の .NET を使用しています。https://aka.ms/dotnet-core-preview をご覧ください
  main -> /home/judge/data/code/bin/Release/net6.0/main.dll
  main -> /home/judge/data/code/bin/Release/net6.0/publish/

ソースコード

diff #

using System;
using System.Linq;
class Program
{
    static void Main()
    {
        var cnt = Console.ReadLine().Split().Select(int.Parse).ToArray();
        var age = Console.ReadLine().Split().Select(int.Parse).ToArray();
        var ans = ((cnt[0] * cnt[1]) - (age.Sum()));
        if (ans >= 0)
            Console.WriteLine(ans);
        else
            Console.WriteLine("-1");
    }
}
0