結果
| 問題 |
No.143 豆
|
| コンテスト | |
| ユーザー |
tsk101
|
| 提出日時 | 2019-08-20 12:25:17 |
| 言語 | C#(csc) (csc 3.9.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 894 bytes |
| コンパイル時間 | 1,412 ms |
| コンパイル使用メモリ | 103,808 KB |
| 実行使用メモリ | 18,048 KB |
| 最終ジャッジ日時 | 2024-10-06 11:53:20 |
| 合計ジャッジ時間 | 2,578 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 16 WA * 1 |
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc) Copyright (C) Microsoft Corporation. All rights reserved.
ソースコード
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace 競プロ
{
class Program
{
static void Main(string[] args)
{
string s = Console.ReadLine();
var strs = s.Split(' ');
int countBean = int.Parse(strs[0]);
int countBag = int.Parse(strs[1]);
int countFam = int.Parse(strs[2]);
int countAllBead = countBean * countBag;
s = Console.ReadLine();
strs = s.Split(' ');
List<int> ageList = new List<int>();
for (int i = 0; i < countFam; i++)
{
countAllBead-= int.Parse(strs[i]);
}
var res = countAllBead > 0 ? countAllBead : -1;
Console.WriteLine(res.ToString());
Console.ReadLine();
}
}
}
tsk101