結果
| 問題 | No.143 豆 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2022-07-15 16:34:22 |
| 言語 | C# (.NET 8.0.404) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 393 bytes |
| 記録 | |
| コンパイル時間 | 15,424 ms |
| コンパイル使用メモリ | 168,864 KB |
| 実行使用メモリ | 187,332 KB |
| 最終ジャッジ日時 | 2024-06-27 11:14:47 |
| 合計ジャッジ時間 | 16,536 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 15 WA * 1 MLE * 1 |
コンパイルメッセージ
復元対象のプロジェクトを決定しています... /home/judge/data/code/main.csproj を復元しました (101 ms)。 MSBuild のバージョン 17.9.6+a4ecab324 (.NET) main -> /home/judge/data/code/bin/Release/net8.0/main.dll main -> /home/judge/data/code/bin/Release/net8.0/publish/
ソースコード
using System;
using System.Linq;
class Program
{
static void Main()
{
var cnt = Console.ReadLine().Split().Select(int.Parse).ToArray();
var age = Console.ReadLine().Split().Select(int.Parse).ToArray();
var ans = ((cnt[0] * cnt[1]) - (age.Sum()));
if (ans > 0)
Console.WriteLine(ans);
else
Console.WriteLine("-1");
}
}