結果

問題 No.143 豆
ユーザー ixTL255ixTL255
提出日時 2016-07-06 22:09:04
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 61 ms / 1,000 ms
コード長 395 bytes
コンパイル時間 2,049 ms
コンパイル使用メモリ 106,144 KB
実行使用メモリ 23,964 KB
最終ジャッジ日時 2023-09-30 16:47:01
合計ジャッジ時間 3,917 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 61 ms
21,952 KB
testcase_01 AC 60 ms
23,932 KB
testcase_02 AC 60 ms
23,920 KB
testcase_03 AC 61 ms
19,732 KB
testcase_04 AC 60 ms
23,760 KB
testcase_05 AC 61 ms
19,668 KB
testcase_06 AC 60 ms
21,844 KB
testcase_07 AC 61 ms
21,872 KB
testcase_08 AC 60 ms
21,768 KB
testcase_09 AC 60 ms
23,760 KB
testcase_10 AC 61 ms
23,964 KB
testcase_11 AC 60 ms
23,844 KB
testcase_12 AC 59 ms
19,808 KB
testcase_13 AC 60 ms
21,736 KB
testcase_14 AC 59 ms
21,888 KB
testcase_15 AC 60 ms
19,932 KB
testcase_16 AC 60 ms
23,768 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;

public class Test
{
	public static void Main()
	{
		var m = Console.ReadLine()
			.Split(' ')
			.Select(x => int.Parse(x))
			.ToList();
		var n = Console.ReadLine()
			.Split(' ')
			.Select(x => int.Parse(x))
			.ToList();

		var ans = (m[0] * m[1]) >= n.Sum() ? m[0] * m[1] - n.Sum() : -1;
		
		Console.WriteLine(ans);
	}
}
0