結果

問題 No.143 豆
ユーザー ototonariototonari
提出日時 2017-03-16 17:18:52
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 59 ms / 1,000 ms
コード長 904 bytes
コンパイル時間 2,232 ms
コンパイル使用メモリ 101,908 KB
実行使用メモリ 22,980 KB
最終ジャッジ日時 2023-09-30 16:57:43
合計ジャッジ時間 4,022 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 58 ms
20,692 KB
testcase_01 AC 57 ms
20,744 KB
testcase_02 AC 59 ms
20,848 KB
testcase_03 AC 58 ms
20,728 KB
testcase_04 AC 58 ms
22,768 KB
testcase_05 AC 57 ms
22,980 KB
testcase_06 AC 57 ms
22,900 KB
testcase_07 AC 57 ms
18,856 KB
testcase_08 AC 57 ms
22,880 KB
testcase_09 AC 57 ms
18,840 KB
testcase_10 AC 56 ms
18,868 KB
testcase_11 AC 58 ms
20,632 KB
testcase_12 AC 58 ms
18,812 KB
testcase_13 AC 58 ms
20,788 KB
testcase_14 AC 58 ms
20,784 KB
testcase_15 AC 58 ms
18,656 KB
testcase_16 AC 59 ms
22,936 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;
using System.Text;
using System.Threading.Tasks;

namespace yukicoder
{
    class Program
    {
        static void Main(string[] args)
        {
            string s = Console.ReadLine();
            string[] t = s.Split(' ');
            int mame = int.Parse(t[0]) * int.Parse(t[1]);
            int[] ages = new int[int.Parse(t[2])];

            s = Console.ReadLine();
            string[] k = s.Split(' ');
            for(int i = 0; i < k.Length; i++)
            {
                mame = mame - int.Parse(k[i]);
            }

            if(0 <= mame)
            {
                Console.WriteLine("{0}", mame);
            }
            else
            {
                Console.WriteLine("{0}", "-1");
            }
            
            //Console.ReadLine();

        }
    }
}
0