結果

問題 No.143 豆
ユーザー mban
提出日時 2016-11-07 10:08:12
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 29 ms / 1,000 ms
コード長 468 bytes
コンパイル時間 813 ms
コンパイル使用メモリ 111,788 KB
実行使用メモリ 27,280 KB
最終ジャッジ日時 2024-07-23 10:38:08
合計ジャッジ時間 1,943 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 17
権限があれば一括ダウンロードができます
コンパイルメッセージ
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