結果

問題 No.143 豆
ユーザー cccccc
提出日時 2022-07-15 16:55:18
言語 C#
(.NET 8.0.203)
結果
MLE  
(最新)
AC  
(最初)
実行時間 -
コード長 396 bytes
コンパイル時間 10,124 ms
コンパイル使用メモリ 144,504 KB
実行使用メモリ 165,440 KB
最終ジャッジ日時 2023-09-09 19:11:12
合計ジャッジ時間 12,060 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 52 ms
28,684 KB
testcase_01 AC 52 ms
28,588 KB
testcase_02 AC 53 ms
28,664 KB
testcase_03 AC 53 ms
28,608 KB
testcase_04 AC 54 ms
28,872 KB
testcase_05 AC 55 ms
28,768 KB
testcase_06 AC 54 ms
28,996 KB
testcase_07 AC 55 ms
30,640 KB
testcase_08 AC 54 ms
28,876 KB
testcase_09 AC 54 ms
30,892 KB
testcase_10 AC 52 ms
30,724 KB
testcase_11 AC 52 ms
28,752 KB
testcase_12 AC 52 ms
28,640 KB
testcase_13 AC 53 ms
28,852 KB
testcase_14 AC 52 ms
28,956 KB
testcase_15 AC 52 ms
28,620 KB
testcase_16 MLE -
権限があれば一括ダウンロードができます
コンパイルメッセージ
  Determining projects to restore...
  Restored /home/judge/data/code/main.csproj (in 170 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(short.Parse).ToArray();
        var age = Console.ReadLine().Split().Select(int.Parse).ToArray();
        int ans = ((cnt[0] * cnt[1]) - (age.Sum()));
        if (ans >= 0)
            Console.WriteLine(ans);
        else
            Console.WriteLine("-1");
    }
}
0