結果

問題 No.143 豆
ユーザー mbanmban
提出日時 2016-11-07 10:08:12
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 62 ms / 1,000 ms
コード長 468 bytes
コンパイル時間 2,963 ms
コンパイル使用メモリ 103,528 KB
実行使用メモリ 23,848 KB
最終ジャッジ日時 2023-09-30 16:53:35
合計ジャッジ時間 3,921 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 61 ms
23,656 KB
testcase_01 AC 60 ms
21,648 KB
testcase_02 AC 60 ms
19,600 KB
testcase_03 AC 61 ms
23,684 KB
testcase_04 AC 61 ms
21,580 KB
testcase_05 AC 60 ms
21,816 KB
testcase_06 AC 61 ms
21,612 KB
testcase_07 AC 60 ms
19,556 KB
testcase_08 AC 62 ms
21,712 KB
testcase_09 AC 60 ms
19,676 KB
testcase_10 AC 62 ms
23,848 KB
testcase_11 AC 60 ms
21,616 KB
testcase_12 AC 62 ms
23,672 KB
testcase_13 AC 62 ms
21,828 KB
testcase_14 AC 61 ms
23,764 KB
testcase_15 AC 61 ms
21,784 KB
testcase_16 AC 60 ms
19,652 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc)
Copyright (C) Microsoft Corporation. All rights reserved.

ソースコード

diff #

using System;
using System.Collections.Generic;
using System.Linq;

class Magatro
{
    static void Main()
    {
        int K, N, F;
        int[] A;
        string[] s = Console.ReadLine().Split(' ');
        K = int.Parse(s[0]);
        N = int.Parse(s[1]);
        F = int.Parse(s[2]);
        A = Console.ReadLine().Split(' ').Select(ss => int.Parse(ss)).ToArray();
        int ans = N * K < A.Sum() ? -1 : N * K - A.Sum();
        Console.WriteLine(ans);
    }
}
0