結果

問題 No.143 豆
ユーザー tassi_2012tassi_2012
提出日時 2015-02-15 22:44:18
言語 C#(csc)
(csc 3.9.0)
結果
WA  
実行時間 -
コード長 451 bytes
コンパイル時間 2,162 ms
コンパイル使用メモリ 103,232 KB
実行使用メモリ 22,980 KB
最終ジャッジ日時 2023-09-06 01:19:16
合計ジャッジ時間 3,909 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 57 ms
22,868 KB
testcase_01 AC 56 ms
20,816 KB
testcase_02 AC 54 ms
20,732 KB
testcase_03 AC 54 ms
20,744 KB
testcase_04 AC 52 ms
20,684 KB
testcase_05 AC 57 ms
20,660 KB
testcase_06 AC 55 ms
22,772 KB
testcase_07 AC 54 ms
20,800 KB
testcase_08 AC 54 ms
20,836 KB
testcase_09 WA -
testcase_10 AC 55 ms
20,760 KB
testcase_11 AC 56 ms
20,748 KB
testcase_12 AC 54 ms
18,748 KB
testcase_13 AC 56 ms
20,628 KB
testcase_14 AC 57 ms
20,676 KB
testcase_15 AC 56 ms
22,856 KB
testcase_16 AC 57 ms
22,772 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc)
Copyright (C) Microsoft Corporation. All rights reserved.

ソースコード

diff #

using System;

class program
{
    public static void Main()
    {
        var str = Console.ReadLine().Split(' ');
        var K = int.Parse(str[0]);
        var N = int.Parse(str[1]);
        var F = int.Parse(str[2]);

        str = Console.ReadLine().Split(' ');
        int sumAge = 0;
        for (int i = 0; i < F; i++)
        {
            sumAge += int.Parse(str[i]);
        }

        Console.WriteLine(K*N-sumAge>0?K*N-sumAge:-1);
    }
}
0